home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / lisp / stk-3.002 / stk-3 / STk-3.1 / Tcl / configure < prev    next >
Encoding:
Text File  |  1996-07-21  |  101.9 KB  |  4,041 lines

  1. #! /bin/sh
  2.  
  3. # Guess values for system-dependent variables and create Makefiles.
  4. # Generated automatically using autoconf version 2.7 
  5. # Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
  6. #
  7. # This configure script is free software; the Free Software Foundation
  8. # gives unlimited permission to copy, distribute and modify it.
  9.  
  10. # Defaults:
  11. ac_help=
  12. ac_default_prefix=/usr/local
  13. # Any additions from configure.in:
  14. ac_help="$ac_help
  15.   --enable-gcc            allow use of gcc if available"
  16. ac_help="$ac_help
  17.   --disable-load          disallow dynamic loading and "load" command"
  18. ac_help="$ac_help
  19.   --enable-shared         build libtcl as a shared library"
  20.  
  21. # Initialize some variables set by options.
  22. # The variables have the same names as the options, with
  23. # dashes changed to underlines.
  24. build=NONE
  25. cache_file=./config.cache
  26. exec_prefix=NONE
  27. host=NONE
  28. no_create=
  29. nonopt=NONE
  30. no_recursion=
  31. prefix=NONE
  32. program_prefix=NONE
  33. program_suffix=NONE
  34. program_transform_name=s,x,x,
  35. silent=
  36. site=
  37. srcdir=
  38. target=NONE
  39. verbose=
  40. x_includes=NONE
  41. x_libraries=NONE
  42. bindir='${exec_prefix}/bin'
  43. sbindir='${exec_prefix}/sbin'
  44. libexecdir='${exec_prefix}/libexec'
  45. datadir='${prefix}/share'
  46. sysconfdir='${prefix}/etc'
  47. sharedstatedir='${prefix}/com'
  48. localstatedir='${prefix}/var'
  49. libdir='${exec_prefix}/lib'
  50. includedir='${prefix}/include'
  51. oldincludedir='/usr/include'
  52. infodir='${prefix}/info'
  53. mandir='${prefix}/man'
  54.  
  55. # Initialize some other variables.
  56. subdirs=
  57. MFLAGS= MAKEFLAGS=
  58.  
  59. ac_prev=
  60. for ac_option
  61. do
  62.  
  63.   # If the previous option needs an argument, assign it.
  64.   if test -n "$ac_prev"; then
  65.     eval "$ac_prev=\$ac_option"
  66.     ac_prev=
  67.     continue
  68.   fi
  69.  
  70.   case "$ac_option" in
  71.   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  72.   *) ac_optarg= ;;
  73.   esac
  74.  
  75.   # Accept the important Cygnus configure options, so we can diagnose typos.
  76.  
  77.   case "$ac_option" in
  78.  
  79.   -bindir | --bindir | --bindi | --bind | --bin | --bi)
  80.     ac_prev=bindir ;;
  81.   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
  82.     bindir="$ac_optarg" ;;
  83.  
  84.   -build | --build | --buil | --bui | --bu)
  85.     ac_prev=build ;;
  86.   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
  87.     build="$ac_optarg" ;;
  88.  
  89.   -cache-file | --cache-file | --cache-fil | --cache-fi \
  90.   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  91.     ac_prev=cache_file ;;
  92.   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  93.   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  94.     cache_file="$ac_optarg" ;;
  95.  
  96.   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
  97.     ac_prev=datadir ;;
  98.   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  99.   | --da=*)
  100.     datadir="$ac_optarg" ;;
  101.  
  102.   -disable-* | --disable-*)
  103.     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  104.     # Reject names that are not valid shell variable names.
  105.     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  106.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  107.     fi
  108.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  109.     eval "enable_${ac_feature}=no" ;;
  110.  
  111.   -enable-* | --enable-*)
  112.     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  113.     # Reject names that are not valid shell variable names.
  114.     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  115.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  116.     fi
  117.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  118.     case "$ac_option" in
  119.       *=*) ;;
  120.       *) ac_optarg=yes ;;
  121.     esac
  122.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  123.  
  124.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  125.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  126.   | --exec | --exe | --ex)
  127.     ac_prev=exec_prefix ;;
  128.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  129.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  130.   | --exec=* | --exe=* | --ex=*)
  131.     exec_prefix="$ac_optarg" ;;
  132.  
  133.   -gas | --gas | --ga | --g)
  134.     # Obsolete; use --with-gas.
  135.     with_gas=yes ;;
  136.  
  137.   -help | --help | --hel | --he)
  138.     # Omit some internal or obsolete options to make the list less imposing.
  139.     # This message is too long to be a string in the A/UX 3.1 sh.
  140.     cat << EOF
  141. Usage: configure [options] [host]
  142. Options: [defaults in brackets after descriptions]
  143. Configuration:
  144.   --cache-file=FILE       cache test results in FILE
  145.   --help                  print this message
  146.   --no-create             do not create output files
  147.   --quiet, --silent       do not print \`checking...' messages
  148.   --version               print the version of autoconf that created configure
  149. Directory and file names:
  150.   --prefix=PREFIX         install architecture-independent files in PREFIX
  151.                           [$ac_default_prefix]
  152.   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
  153.                           [same as prefix]
  154.   --bindir=DIR            user executables in DIR [EPREFIX/bin]
  155.   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
  156.   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
  157.   --datadir=DIR           read-only architecture-independent data in DIR
  158.                           [PREFIX/share]
  159.   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
  160.   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
  161.                           [PREFIX/com]
  162.   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
  163.   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
  164.   --includedir=DIR        C header files in DIR [PREFIX/include]
  165.   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
  166.   --infodir=DIR           info documentation in DIR [PREFIX/info]
  167.   --mandir=DIR            man documentation in DIR [PREFIX/man]
  168.   --srcdir=DIR            find the sources in DIR [configure dir or ..]
  169.   --program-prefix=PREFIX prepend PREFIX to installed program names
  170.   --program-suffix=SUFFIX append SUFFIX to installed program names
  171.   --program-transform-name=PROGRAM
  172.                           run sed PROGRAM on installed program names
  173. EOF
  174.     cat << EOF
  175. Host type:
  176.   --build=BUILD           configure for building on BUILD [BUILD=HOST]
  177.   --host=HOST             configure for HOST [guessed]
  178.   --target=TARGET         configure for TARGET [TARGET=HOST]
  179. Features and packages:
  180.   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  181.   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  182.   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  183.   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  184.   --x-includes=DIR        X include files are in DIR
  185.   --x-libraries=DIR       X library files are in DIR
  186. EOF
  187.     if test -n "$ac_help"; then
  188.       echo "--enable and --with options recognized:$ac_help"
  189.     fi
  190.     exit 0 ;;
  191.  
  192.   -host | --host | --hos | --ho)
  193.     ac_prev=host ;;
  194.   -host=* | --host=* | --hos=* | --ho=*)
  195.     host="$ac_optarg" ;;
  196.  
  197.   -includedir | --includedir | --includedi | --included | --include \
  198.   | --includ | --inclu | --incl | --inc)
  199.     ac_prev=includedir ;;
  200.   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  201.   | --includ=* | --inclu=* | --incl=* | --inc=*)
  202.     includedir="$ac_optarg" ;;
  203.  
  204.   -infodir | --infodir | --infodi | --infod | --info | --inf)
  205.     ac_prev=infodir ;;
  206.   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
  207.     infodir="$ac_optarg" ;;
  208.  
  209.   -libdir | --libdir | --libdi | --libd)
  210.     ac_prev=libdir ;;
  211.   -libdir=* | --libdir=* | --libdi=* | --libd=*)
  212.     libdir="$ac_optarg" ;;
  213.  
  214.   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  215.   | --libexe | --libex | --libe)
  216.     ac_prev=libexecdir ;;
  217.   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  218.   | --libexe=* | --libex=* | --libe=*)
  219.     libexecdir="$ac_optarg" ;;
  220.  
  221.   -localstatedir | --localstatedir | --localstatedi | --localstated \
  222.   | --localstate | --localstat | --localsta | --localst \
  223.   | --locals | --local | --loca | --loc | --lo)
  224.     ac_prev=localstatedir ;;
  225.   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  226.   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  227.   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
  228.     localstatedir="$ac_optarg" ;;
  229.  
  230.   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
  231.     ac_prev=mandir ;;
  232.   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
  233.     mandir="$ac_optarg" ;;
  234.  
  235.   -nfp | --nfp | --nf)
  236.     # Obsolete; use --without-fp.
  237.     with_fp=no ;;
  238.  
  239.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  240.   | --no-cr | --no-c)
  241.     no_create=yes ;;
  242.  
  243.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  244.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  245.     no_recursion=yes ;;
  246.  
  247.   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  248.   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  249.   | --oldin | --oldi | --old | --ol | --o)
  250.     ac_prev=oldincludedir ;;
  251.   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  252.   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  253.   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
  254.     oldincludedir="$ac_optarg" ;;
  255.  
  256.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  257.     ac_prev=prefix ;;
  258.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  259.     prefix="$ac_optarg" ;;
  260.  
  261.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  262.   | --program-pre | --program-pr | --program-p)
  263.     ac_prev=program_prefix ;;
  264.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  265.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  266.     program_prefix="$ac_optarg" ;;
  267.  
  268.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  269.   | --program-suf | --program-su | --program-s)
  270.     ac_prev=program_suffix ;;
  271.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  272.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  273.     program_suffix="$ac_optarg" ;;
  274.  
  275.   -program-transform-name | --program-transform-name \
  276.   | --program-transform-nam | --program-transform-na \
  277.   | --program-transform-n | --program-transform- \
  278.   | --program-transform | --program-transfor \
  279.   | --program-transfo | --program-transf \
  280.   | --program-trans | --program-tran \
  281.   | --progr-tra | --program-tr | --program-t)
  282.     ac_prev=program_transform_name ;;
  283.   -program-transform-name=* | --program-transform-name=* \
  284.   | --program-transform-nam=* | --program-transform-na=* \
  285.   | --program-transform-n=* | --program-transform-=* \
  286.   | --program-transform=* | --program-transfor=* \
  287.   | --program-transfo=* | --program-transf=* \
  288.   | --program-trans=* | --program-tran=* \
  289.   | --progr-tra=* | --program-tr=* | --program-t=*)
  290.     program_transform_name="$ac_optarg" ;;
  291.  
  292.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  293.   | -silent | --silent | --silen | --sile | --sil)
  294.     silent=yes ;;
  295.  
  296.   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
  297.     ac_prev=sbindir ;;
  298.   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  299.   | --sbi=* | --sb=*)
  300.     sbindir="$ac_optarg" ;;
  301.  
  302.   -sharedstatedir | --sharedstatedir | --sharedstatedi \
  303.   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  304.   | --sharedst | --shareds | --shared | --share | --shar \
  305.   | --sha | --sh)
  306.     ac_prev=sharedstatedir ;;
  307.   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  308.   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  309.   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  310.   | --sha=* | --sh=*)
  311.     sharedstatedir="$ac_optarg" ;;
  312.  
  313.   -site | --site | --sit)
  314.     ac_prev=site ;;
  315.   -site=* | --site=* | --sit=*)
  316.     site="$ac_optarg" ;;
  317.  
  318.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  319.     ac_prev=srcdir ;;
  320.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  321.     srcdir="$ac_optarg" ;;
  322.  
  323.   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  324.   | --syscon | --sysco | --sysc | --sys | --sy)
  325.     ac_prev=sysconfdir ;;
  326.   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  327.   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
  328.     sysconfdir="$ac_optarg" ;;
  329.  
  330.   -target | --target | --targe | --targ | --tar | --ta | --t)
  331.     ac_prev=target ;;
  332.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  333.     target="$ac_optarg" ;;
  334.  
  335.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  336.     verbose=yes ;;
  337.  
  338.   -version | --version | --versio | --versi | --vers)
  339.     echo "configure generated by autoconf version 2.7"
  340.     exit 0 ;;
  341.  
  342.   -with-* | --with-*)
  343.     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  344.     # Reject names that are not valid shell variable names.
  345.     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  346.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  347.     fi
  348.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  349.     case "$ac_option" in
  350.       *=*) ;;
  351.       *) ac_optarg=yes ;;
  352.     esac
  353.     eval "with_${ac_package}='$ac_optarg'" ;;
  354.  
  355.   -without-* | --without-*)
  356.     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  357.     # Reject names that are not valid shell variable names.
  358.     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  359.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  360.     fi
  361.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  362.     eval "with_${ac_package}=no" ;;
  363.  
  364.   --x)
  365.     # Obsolete; use --with-x.
  366.     with_x=yes ;;
  367.  
  368.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  369.   | --x-incl | --x-inc | --x-in | --x-i)
  370.     ac_prev=x_includes ;;
  371.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  372.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  373.     x_includes="$ac_optarg" ;;
  374.  
  375.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  376.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  377.     ac_prev=x_libraries ;;
  378.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  379.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  380.     x_libraries="$ac_optarg" ;;
  381.  
  382.   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  383.     ;;
  384.  
  385.   *)
  386.     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  387.       echo "configure: warning: $ac_option: invalid host type" 1>&2
  388.     fi
  389.     if test "x$nonopt" != xNONE; then
  390.       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  391.     fi
  392.     nonopt="$ac_option"
  393.     ;;
  394.  
  395.   esac
  396. done
  397.  
  398. if test -n "$ac_prev"; then
  399.   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  400. fi
  401.  
  402. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  403.  
  404. # File descriptor usage:
  405. # 0 standard input
  406. # 1 file creation
  407. # 2 errors and warnings
  408. # 3 some systems may open it to /dev/tty
  409. # 4 used on the Kubota Titan
  410. # 6 checking for... messages and results
  411. # 5 compiler messages saved in config.log
  412. if test "$silent" = yes; then
  413.   exec 6>/dev/null
  414. else
  415.   exec 6>&1
  416. fi
  417. exec 5>./config.log
  418.  
  419. echo "\
  420. This file contains any messages produced by compilers while
  421. running configure, to aid debugging if configure makes a mistake.
  422. " 1>&5
  423.  
  424. # Strip out --no-create and --no-recursion so they do not pile up.
  425. # Also quote any args containing shell metacharacters.
  426. ac_configure_args=
  427. for ac_arg
  428. do
  429.   case "$ac_arg" in
  430.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  431.   | --no-cr | --no-c) ;;
  432.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  433.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  434.   *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  435.   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  436.   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  437.   esac
  438. done
  439.  
  440. # NLS nuisances.
  441. # Only set LANG and LC_ALL to C if already set.
  442. # These must not be set unconditionally because not all systems understand
  443. # e.g. LANG=C (notably SCO).
  444. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  445. if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  446.  
  447. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  448. rm -rf conftest* confdefs.h
  449. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  450. echo > confdefs.h
  451.  
  452. # A filename unique to this package, relative to the directory that
  453. # configure is in, which we can look for to find out if srcdir is correct.
  454. ac_unique_file=./tcl.h
  455.  
  456. # Find the source files, if location was not specified.
  457. if test -z "$srcdir"; then
  458.   ac_srcdir_defaulted=yes
  459.   # Try the directory containing this script, then its parent.
  460.   ac_prog=$0
  461.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  462.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  463.   srcdir=$ac_confdir
  464.   if test ! -r $srcdir/$ac_unique_file; then
  465.     srcdir=..
  466.   fi
  467. else
  468.   ac_srcdir_defaulted=no
  469. fi
  470. if test ! -r $srcdir/$ac_unique_file; then
  471.   if test "$ac_srcdir_defaulted" = yes; then
  472.     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  473.   else
  474.     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  475.   fi
  476. fi
  477. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  478.  
  479. # Prefer explicitly selected file to automatically selected ones.
  480. if test -z "$CONFIG_SITE"; then
  481.   if test "x$prefix" != xNONE; then
  482.     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  483.   else
  484.     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  485.   fi
  486. fi
  487. for ac_site_file in $CONFIG_SITE; do
  488.   if test -r "$ac_site_file"; then
  489.     echo "loading site script $ac_site_file"
  490.     . "$ac_site_file"
  491.   fi
  492. done
  493.  
  494. if test -r "$cache_file"; then
  495.   echo "loading cache $cache_file"
  496.   . $cache_file
  497. else
  498.   echo "creating cache $cache_file"
  499.   > $cache_file
  500. fi
  501.  
  502. ac_ext=c
  503. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  504. ac_cpp='echo $CPP $CPPFLAGS 1>&5;
  505. $CPP $CPPFLAGS'
  506. ac_compile='echo ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5;
  507. ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
  508. ac_link='echo ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5;
  509. ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
  510.  
  511. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  512.   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  513.   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  514.     ac_n= ac_c='
  515. ' ac_t='    '
  516.   else
  517.     ac_n=-n ac_c= ac_t=
  518.   fi
  519. else
  520.   ac_n= ac_c='\c' ac_t=
  521. fi
  522.  
  523.  
  524. # SCCS: @(#) configure.in 1.102 96/04/17 10:46:25
  525.  
  526. TCL_VERSION=7.5
  527. TCL_MAJOR_VERSION=7
  528. TCL_MINOR_VERSION=5
  529. VERSION=${TCL_VERSION}
  530.  
  531. if test "${prefix}" = "NONE"; then
  532.     prefix=/usr/local
  533. fi
  534. if test "${exec_prefix}" = "NONE"; then
  535.     exec_prefix=$prefix
  536. fi
  537.  
  538. # Extract the first word of "ranlib", so it can be a program name with args.
  539. set dummy ranlib; ac_word=$2
  540. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  541. if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  542.   echo $ac_n "(cached) $ac_c" 1>&6
  543. else
  544.   if test -n "$RANLIB"; then
  545.   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  546. else
  547.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  548.   for ac_dir in $PATH; do
  549.     test -z "$ac_dir" && ac_dir=.
  550.     if test -f $ac_dir/$ac_word; then
  551.       ac_cv_prog_RANLIB="ranlib"
  552.       break
  553.     fi
  554.   done
  555.   IFS="$ac_save_ifs"
  556.   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
  557. fi
  558. fi
  559. RANLIB="$ac_cv_prog_RANLIB"
  560. if test -n "$RANLIB"; then
  561.   echo "$ac_t""$RANLIB" 1>&6
  562. else
  563.   echo "$ac_t""no" 1>&6
  564. fi
  565.  
  566. # Check whether --enable-gcc or --disable-gcc was given.
  567. if test "${enable_gcc+set}" = set; then
  568.   enableval="$enable_gcc"
  569.   tcl_ok=$enableval
  570. else
  571.   tcl_ok=no
  572. fi
  573.  
  574. if test "$tcl_ok" = "yes"; then
  575.     # Extract the first word of "gcc", so it can be a program name with args.
  576. set dummy gcc; ac_word=$2
  577. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  578. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  579.   echo $ac_n "(cached) $ac_c" 1>&6
  580. else
  581.   if test -n "$CC"; then
  582.   ac_cv_prog_CC="$CC" # Let the user override the test.
  583. else
  584.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  585.   for ac_dir in $PATH; do
  586.     test -z "$ac_dir" && ac_dir=.
  587.     if test -f $ac_dir/$ac_word; then
  588.       ac_cv_prog_CC="gcc"
  589.       break
  590.     fi
  591.   done
  592.   IFS="$ac_save_ifs"
  593.   test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
  594. fi
  595. fi
  596. CC="$ac_cv_prog_CC"
  597. if test -n "$CC"; then
  598.   echo "$ac_t""$CC" 1>&6
  599. else
  600.   echo "$ac_t""no" 1>&6
  601. fi
  602.  
  603.  
  604. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  605. if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  606.   echo $ac_n "(cached) $ac_c" 1>&6
  607. else
  608.   cat > conftest.c <<EOF
  609. #ifdef __GNUC__
  610.   yes;
  611. #endif
  612. EOF
  613. if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
  614.   ac_cv_prog_gcc=yes
  615. else
  616.   ac_cv_prog_gcc=no
  617. fi
  618. fi
  619.  
  620. echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  621. if test $ac_cv_prog_gcc = yes; then
  622.   GCC=yes
  623.   if test "${CFLAGS+set}" != set; then
  624.     echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
  625. if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
  626.   echo $ac_n "(cached) $ac_c" 1>&6
  627. else
  628.   echo 'void f(){}' > conftest.c
  629. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  630.   ac_cv_prog_gcc_g=yes
  631. else
  632.   ac_cv_prog_gcc_g=no
  633. fi
  634. rm -f conftest*
  635.  
  636. fi
  637.  
  638. echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
  639.     if test $ac_cv_prog_gcc_g = yes; then
  640.       CFLAGS="-g -O"
  641.     else
  642.       CFLAGS="-O"
  643.     fi
  644.   fi
  645. else
  646.   GCC=
  647.   test "${CFLAGS+set}" = set || CFLAGS="-g"
  648. fi
  649.  
  650. else
  651.     CC=${CC-cc}
  652.  
  653. fi
  654. # If we cannot run a trivial program, we must be cross compiling.
  655. echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
  656. if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
  657.   echo $ac_n "(cached) $ac_c" 1>&6
  658. else
  659.   if test "$cross_compiling" = yes; then
  660.   ac_cv_c_cross=yes
  661. else
  662. cat > conftest.$ac_ext <<EOF
  663. #line 664 "configure"
  664. #include "confdefs.h"
  665. main(){return(0);}
  666. EOF
  667. eval $ac_link
  668. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  669.   ac_cv_c_cross=no
  670. else
  671.   ac_cv_c_cross=yes
  672. fi
  673. fi
  674. rm -fr conftest*
  675. fi
  676.  
  677. echo "$ac_t""$ac_cv_c_cross" 1>&6
  678. cross_compiling=$ac_cv_c_cross
  679.  
  680.  
  681. #--------------------------------------------------------------------
  682. #    Supply substitutes for missing POSIX library procedures, or
  683. #    set flags so Tcl uses alternate procedures.
  684. #--------------------------------------------------------------------
  685.  
  686. for ac_func in getcwd opendir strerror strstr
  687. do
  688. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  689. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  690.   echo $ac_n "(cached) $ac_c" 1>&6
  691. else
  692.   cat > conftest.$ac_ext <<EOF
  693. #line 694 "configure"
  694. #include "confdefs.h"
  695. /* System header to define __stub macros and hopefully few prototypes,
  696.     which can conflict with char $ac_func(); below.  */
  697. #include <assert.h>
  698. /* Override any gcc2 internal prototype to avoid an error.  */
  699. char $ac_func();
  700.  
  701. int main() { return 0; }
  702. int t() {
  703.  
  704. /* The GNU C library defines this for functions which it implements
  705.     to always fail with ENOSYS.  Some functions are actually named
  706.     something starting with __ and the normal name is an alias.  */
  707. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  708. choke me
  709. #else
  710. $ac_func();
  711. #endif
  712.  
  713. ; return 0; }
  714. EOF
  715. if eval $ac_link; then
  716.   rm -rf conftest*
  717.   eval "ac_cv_func_$ac_func=yes"
  718. else
  719.   rm -rf conftest*
  720.   eval "ac_cv_func_$ac_func=no"
  721. fi
  722. rm -f conftest*
  723.  
  724. fi
  725. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  726.   echo "$ac_t""yes" 1>&6
  727.   :
  728. else
  729.   echo "$ac_t""no" 1>&6
  730. LIBOBJS="$LIBOBJS ${ac_func}.o"
  731. fi
  732.  
  733. done
  734.  
  735. for ac_func in strtol tmpnam waitpid
  736. do
  737. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  738. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  739.   echo $ac_n "(cached) $ac_c" 1>&6
  740. else
  741.   cat > conftest.$ac_ext <<EOF
  742. #line 743 "configure"
  743. #include "confdefs.h"
  744. /* System header to define __stub macros and hopefully few prototypes,
  745.     which can conflict with char $ac_func(); below.  */
  746. #include <assert.h>
  747. /* Override any gcc2 internal prototype to avoid an error.  */
  748. char $ac_func();
  749.  
  750. int main() { return 0; }
  751. int t() {
  752.  
  753. /* The GNU C library defines this for functions which it implements
  754.     to always fail with ENOSYS.  Some functions are actually named
  755.     something starting with __ and the normal name is an alias.  */
  756. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  757. choke me
  758. #else
  759. $ac_func();
  760. #endif
  761.  
  762. ; return 0; }
  763. EOF
  764. if eval $ac_link; then
  765.   rm -rf conftest*
  766.   eval "ac_cv_func_$ac_func=yes"
  767. else
  768.   rm -rf conftest*
  769.   eval "ac_cv_func_$ac_func=no"
  770. fi
  771. rm -f conftest*
  772.  
  773. fi
  774. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  775.   echo "$ac_t""yes" 1>&6
  776.   :
  777. else
  778.   echo "$ac_t""no" 1>&6
  779. LIBOBJS="$LIBOBJS ${ac_func}.o"
  780. fi
  781.  
  782. done
  783.  
  784. echo $ac_n "checking for strerror""... $ac_c" 1>&6
  785. if eval "test \"`echo '$''{'ac_cv_func_strerror'+set}'`\" = set"; then
  786.   echo $ac_n "(cached) $ac_c" 1>&6
  787. else
  788.   cat > conftest.$ac_ext <<EOF
  789. #line 790 "configure"
  790. #include "confdefs.h"
  791. /* System header to define __stub macros and hopefully few prototypes,
  792.     which can conflict with char strerror(); below.  */
  793. #include <assert.h>
  794. /* Override any gcc2 internal prototype to avoid an error.  */
  795. char strerror();
  796.  
  797. int main() { return 0; }
  798. int t() {
  799.  
  800. /* The GNU C library defines this for functions which it implements
  801.     to always fail with ENOSYS.  Some functions are actually named
  802.     something starting with __ and the normal name is an alias.  */
  803. #if defined (__stub_strerror) || defined (__stub___strerror)
  804. choke me
  805. #else
  806. strerror();
  807. #endif
  808.  
  809. ; return 0; }
  810. EOF
  811. if eval $ac_link; then
  812.   rm -rf conftest*
  813.   eval "ac_cv_func_strerror=yes"
  814. else
  815.   rm -rf conftest*
  816.   eval "ac_cv_func_strerror=no"
  817. fi
  818. rm -f conftest*
  819.  
  820. fi
  821. if eval "test \"`echo '$ac_cv_func_'strerror`\" = yes"; then
  822.   echo "$ac_t""yes" 1>&6
  823.   :
  824. else
  825.   echo "$ac_t""no" 1>&6
  826. cat >> confdefs.h <<\EOF
  827. #define NO_STRERROR 1
  828. EOF
  829.  
  830. fi
  831.  
  832. echo $ac_n "checking for getwd""... $ac_c" 1>&6
  833. if eval "test \"`echo '$''{'ac_cv_func_getwd'+set}'`\" = set"; then
  834.   echo $ac_n "(cached) $ac_c" 1>&6
  835. else
  836.   cat > conftest.$ac_ext <<EOF
  837. #line 838 "configure"
  838. #include "confdefs.h"
  839. /* System header to define __stub macros and hopefully few prototypes,
  840.     which can conflict with char getwd(); below.  */
  841. #include <assert.h>
  842. /* Override any gcc2 internal prototype to avoid an error.  */
  843. char getwd();
  844.  
  845. int main() { return 0; }
  846. int t() {
  847.  
  848. /* The GNU C library defines this for functions which it implements
  849.     to always fail with ENOSYS.  Some functions are actually named
  850.     something starting with __ and the normal name is an alias.  */
  851. #if defined (__stub_getwd) || defined (__stub___getwd)
  852. choke me
  853. #else
  854. getwd();
  855. #endif
  856.  
  857. ; return 0; }
  858. EOF
  859. if eval $ac_link; then
  860.   rm -rf conftest*
  861.   eval "ac_cv_func_getwd=yes"
  862. else
  863.   rm -rf conftest*
  864.   eval "ac_cv_func_getwd=no"
  865. fi
  866. rm -f conftest*
  867.  
  868. fi
  869. if eval "test \"`echo '$ac_cv_func_'getwd`\" = yes"; then
  870.   echo "$ac_t""yes" 1>&6
  871.   :
  872. else
  873.   echo "$ac_t""no" 1>&6
  874. cat >> confdefs.h <<\EOF
  875. #define NO_GETWD 1
  876. EOF
  877.  
  878. fi
  879.  
  880. echo $ac_n "checking for wait3""... $ac_c" 1>&6
  881. if eval "test \"`echo '$''{'ac_cv_func_wait3'+set}'`\" = set"; then
  882.   echo $ac_n "(cached) $ac_c" 1>&6
  883. else
  884.   cat > conftest.$ac_ext <<EOF
  885. #line 886 "configure"
  886. #include "confdefs.h"
  887. /* System header to define __stub macros and hopefully few prototypes,
  888.     which can conflict with char wait3(); below.  */
  889. #include <assert.h>
  890. /* Override any gcc2 internal prototype to avoid an error.  */
  891. char wait3();
  892.  
  893. int main() { return 0; }
  894. int t() {
  895.  
  896. /* The GNU C library defines this for functions which it implements
  897.     to always fail with ENOSYS.  Some functions are actually named
  898.     something starting with __ and the normal name is an alias.  */
  899. #if defined (__stub_wait3) || defined (__stub___wait3)
  900. choke me
  901. #else
  902. wait3();
  903. #endif
  904.  
  905. ; return 0; }
  906. EOF
  907. if eval $ac_link; then
  908.   rm -rf conftest*
  909.   eval "ac_cv_func_wait3=yes"
  910. else
  911.   rm -rf conftest*
  912.   eval "ac_cv_func_wait3=no"
  913. fi
  914. rm -f conftest*
  915.  
  916. fi
  917. if eval "test \"`echo '$ac_cv_func_'wait3`\" = yes"; then
  918.   echo "$ac_t""yes" 1>&6
  919.   :
  920. else
  921.   echo "$ac_t""no" 1>&6
  922. cat >> confdefs.h <<\EOF
  923. #define NO_WAIT3 1
  924. EOF
  925.  
  926. fi
  927.  
  928. echo $ac_n "checking for uname""... $ac_c" 1>&6
  929. if eval "test \"`echo '$''{'ac_cv_func_uname'+set}'`\" = set"; then
  930.   echo $ac_n "(cached) $ac_c" 1>&6
  931. else
  932.   cat > conftest.$ac_ext <<EOF
  933. #line 934 "configure"
  934. #include "confdefs.h"
  935. /* System header to define __stub macros and hopefully few prototypes,
  936.     which can conflict with char uname(); below.  */
  937. #include <assert.h>
  938. /* Override any gcc2 internal prototype to avoid an error.  */
  939. char uname();
  940.  
  941. int main() { return 0; }
  942. int t() {
  943.  
  944. /* The GNU C library defines this for functions which it implements
  945.     to always fail with ENOSYS.  Some functions are actually named
  946.     something starting with __ and the normal name is an alias.  */
  947. #if defined (__stub_uname) || defined (__stub___uname)
  948. choke me
  949. #else
  950. uname();
  951. #endif
  952.  
  953. ; return 0; }
  954. EOF
  955. if eval $ac_link; then
  956.   rm -rf conftest*
  957.   eval "ac_cv_func_uname=yes"
  958. else
  959.   rm -rf conftest*
  960.   eval "ac_cv_func_uname=no"
  961. fi
  962. rm -f conftest*
  963.  
  964. fi
  965. if eval "test \"`echo '$ac_cv_func_'uname`\" = yes"; then
  966.   echo "$ac_t""yes" 1>&6
  967.   :
  968. else
  969.   echo "$ac_t""no" 1>&6
  970. cat >> confdefs.h <<\EOF
  971. #define NO_UNAME 1
  972. EOF
  973.  
  974. fi
  975.  
  976.  
  977. #--------------------------------------------------------------------
  978. #    On a few very rare systems, all of the libm.a stuff is
  979. #    already in libc.a.  Set compiler flags accordingly.
  980. #    Also, Linux requires the "ieee" library for math to work
  981. #    right (and it must appear before "-lm").
  982. #--------------------------------------------------------------------
  983.  
  984. echo $ac_n "checking for sin""... $ac_c" 1>&6
  985. if eval "test \"`echo '$''{'ac_cv_func_sin'+set}'`\" = set"; then
  986.   echo $ac_n "(cached) $ac_c" 1>&6
  987. else
  988.   cat > conftest.$ac_ext <<EOF
  989. #line 990 "configure"
  990. #include "confdefs.h"
  991. /* System header to define __stub macros and hopefully few prototypes,
  992.     which can conflict with char sin(); below.  */
  993. #include <assert.h>
  994. /* Override any gcc2 internal prototype to avoid an error.  */
  995. char sin();
  996.  
  997. int main() { return 0; }
  998. int t() {
  999.  
  1000. /* The GNU C library defines this for functions which it implements
  1001.     to always fail with ENOSYS.  Some functions are actually named
  1002.     something starting with __ and the normal name is an alias.  */
  1003. #if defined (__stub_sin) || defined (__stub___sin)
  1004. choke me
  1005. #else
  1006. sin();
  1007. #endif
  1008.  
  1009. ; return 0; }
  1010. EOF
  1011. if eval $ac_link; then
  1012.   rm -rf conftest*
  1013.   eval "ac_cv_func_sin=yes"
  1014. else
  1015.   rm -rf conftest*
  1016.   eval "ac_cv_func_sin=no"
  1017. fi
  1018. rm -f conftest*
  1019.  
  1020. fi
  1021. if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
  1022.   echo "$ac_t""yes" 1>&6
  1023.   MATH_LIBS=""
  1024. else
  1025.   echo "$ac_t""no" 1>&6
  1026. MATH_LIBS="-lm"
  1027. fi
  1028.  
  1029. echo $ac_n "checking for -lieee""... $ac_c" 1>&6
  1030. ac_lib_var=`echo ieee | tr '.-/+' '___p'`
  1031. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1032.   echo $ac_n "(cached) $ac_c" 1>&6
  1033. else
  1034.   ac_save_LIBS="$LIBS"
  1035. LIBS="-lieee  $LIBS"
  1036. cat > conftest.$ac_ext <<EOF
  1037. #line 1038 "configure"
  1038. #include "confdefs.h"
  1039.  
  1040. int main() { return 0; }
  1041. int t() {
  1042. main()
  1043. ; return 0; }
  1044. EOF
  1045. if eval $ac_link; then
  1046.   rm -rf conftest*
  1047.   eval "ac_cv_lib_$ac_lib_var=yes"
  1048. else
  1049.   rm -rf conftest*
  1050.   eval "ac_cv_lib_$ac_lib_var=no"
  1051. fi
  1052. rm -f conftest*
  1053. LIBS="$ac_save_LIBS"
  1054.  
  1055. fi
  1056. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1057.   echo "$ac_t""yes" 1>&6
  1058.   MATH_LIBS="-lieee $MATH_LIBS"
  1059. else
  1060.   echo "$ac_t""no" 1>&6
  1061. fi
  1062.  
  1063.  
  1064. #--------------------------------------------------------------------
  1065. #    Supply substitutes for missing POSIX header files.  Special
  1066. #    notes:
  1067. #        - stdlib.h doesn't define strtol, strtoul, or
  1068. #          strtod insome versions of SunOS
  1069. #        - some versions of string.h don't declare procedures such
  1070. #          as strstr
  1071. #--------------------------------------------------------------------
  1072.  
  1073. echo $ac_n "checking dirent.h""... $ac_c" 1>&6
  1074. cat > conftest.$ac_ext <<EOF
  1075. #line 1076 "configure"
  1076. #include "confdefs.h"
  1077. #include <sys/types.h>
  1078. #include <dirent.h>
  1079. int main() { return 0; }
  1080. int t() {
  1081.  
  1082. #ifndef _POSIX_SOURCE
  1083. #   ifdef __Lynx__
  1084.     /*
  1085.      * Generate compilation error to make the test fail:  Lynx headers
  1086.      * are only valid if really in the POSIX environment.
  1087.      */
  1088.  
  1089.     missing_procedure();
  1090. #   endif
  1091. #endif
  1092. DIR *d;
  1093. struct dirent *entryPtr;
  1094. char *p;
  1095. d = opendir("foobar");
  1096. entryPtr = readdir(d);
  1097. p = entryPtr->d_name;
  1098. closedir(d);
  1099.  
  1100. ; return 0; }
  1101. EOF
  1102. if eval $ac_link; then
  1103.   rm -rf conftest*
  1104.   tcl_ok=yes
  1105. else
  1106.   rm -rf conftest*
  1107.   tcl_ok=no
  1108. fi
  1109. rm -f conftest*
  1110.  
  1111. if test $tcl_ok = no; then
  1112.     cat >> confdefs.h <<\EOF
  1113. #define NO_DIRENT_H 1
  1114. EOF
  1115.  
  1116. fi
  1117. echo "$ac_t""$tcl_ok" 1>&6
  1118. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  1119. # On Suns, sometimes $CPP names a directory.
  1120. if test -n "$CPP" && test -d "$CPP"; then
  1121.   CPP=
  1122. fi
  1123. if test -z "$CPP"; then
  1124. if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  1125.   echo $ac_n "(cached) $ac_c" 1>&6
  1126. else
  1127.     # This must be in double quotes, not single quotes, because CPP may get
  1128.   # substituted into the Makefile and "${CC-cc}" will confuse make.
  1129.   CPP="${CC-cc} -E"
  1130.   # On the NeXT, cc -E runs the code through the compiler's parser,
  1131.   # not just through cpp.
  1132.   cat > conftest.$ac_ext <<EOF
  1133. #line 1134 "configure"
  1134. #include "confdefs.h"
  1135. #include <assert.h>
  1136. Syntax Error
  1137. EOF
  1138. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1139. ac_err=`grep -v '^ *+' conftest.out`
  1140. if test -z "$ac_err"; then
  1141.   :
  1142. else
  1143.   echo "$ac_err" >&5
  1144.   rm -rf conftest*
  1145.   CPP="${CC-cc} -E -traditional-cpp"
  1146.   cat > conftest.$ac_ext <<EOF
  1147. #line 1148 "configure"
  1148. #include "confdefs.h"
  1149. #include <assert.h>
  1150. Syntax Error
  1151. EOF
  1152. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1153. ac_err=`grep -v '^ *+' conftest.out`
  1154. if test -z "$ac_err"; then
  1155.   :
  1156. else
  1157.   echo "$ac_err" >&5
  1158.   rm -rf conftest*
  1159.   CPP=/lib/cpp
  1160. fi
  1161. rm -f conftest*
  1162. fi
  1163. rm -f conftest*
  1164.   ac_cv_prog_CPP="$CPP"
  1165. fi
  1166.   CPP="$ac_cv_prog_CPP"
  1167. else
  1168.   ac_cv_prog_CPP="$CPP"
  1169. fi
  1170. echo "$ac_t""$CPP" 1>&6
  1171.  
  1172. ac_safe=`echo "errno.h" | tr './\055' '___'`
  1173. echo $ac_n "checking for errno.h""... $ac_c" 1>&6
  1174. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1175.   echo $ac_n "(cached) $ac_c" 1>&6
  1176. else
  1177.   cat > conftest.$ac_ext <<EOF
  1178. #line 1179 "configure"
  1179. #include "confdefs.h"
  1180. #include <errno.h>
  1181. EOF
  1182. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1183. ac_err=`grep -v '^ *+' conftest.out`
  1184. if test -z "$ac_err"; then
  1185.   rm -rf conftest*
  1186.   eval "ac_cv_header_$ac_safe=yes"
  1187. else
  1188.   echo "$ac_err" >&5
  1189.   rm -rf conftest*
  1190.   eval "ac_cv_header_$ac_safe=no"
  1191. fi
  1192. rm -f conftest*
  1193. fi
  1194. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1195.   echo "$ac_t""yes" 1>&6
  1196.   :
  1197. else
  1198.   echo "$ac_t""no" 1>&6
  1199. cat >> confdefs.h <<\EOF
  1200. #define NO_ERRNO_H 1
  1201. EOF
  1202.  
  1203. fi
  1204.  
  1205. ac_safe=`echo "float.h" | tr './\055' '___'`
  1206. echo $ac_n "checking for float.h""... $ac_c" 1>&6
  1207. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1208.   echo $ac_n "(cached) $ac_c" 1>&6
  1209. else
  1210.   cat > conftest.$ac_ext <<EOF
  1211. #line 1212 "configure"
  1212. #include "confdefs.h"
  1213. #include <float.h>
  1214. EOF
  1215. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1216. ac_err=`grep -v '^ *+' conftest.out`
  1217. if test -z "$ac_err"; then
  1218.   rm -rf conftest*
  1219.   eval "ac_cv_header_$ac_safe=yes"
  1220. else
  1221.   echo "$ac_err" >&5
  1222.   rm -rf conftest*
  1223.   eval "ac_cv_header_$ac_safe=no"
  1224. fi
  1225. rm -f conftest*
  1226. fi
  1227. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1228.   echo "$ac_t""yes" 1>&6
  1229.   :
  1230. else
  1231.   echo "$ac_t""no" 1>&6
  1232. cat >> confdefs.h <<\EOF
  1233. #define NO_FLOAT_H 1
  1234. EOF
  1235.  
  1236. fi
  1237.  
  1238. ac_safe=`echo "limits.h" | tr './\055' '___'`
  1239. echo $ac_n "checking for limits.h""... $ac_c" 1>&6
  1240. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1241.   echo $ac_n "(cached) $ac_c" 1>&6
  1242. else
  1243.   cat > conftest.$ac_ext <<EOF
  1244. #line 1245 "configure"
  1245. #include "confdefs.h"
  1246. #include <limits.h>
  1247. EOF
  1248. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1249. ac_err=`grep -v '^ *+' conftest.out`
  1250. if test -z "$ac_err"; then
  1251.   rm -rf conftest*
  1252.   eval "ac_cv_header_$ac_safe=yes"
  1253. else
  1254.   echo "$ac_err" >&5
  1255.   rm -rf conftest*
  1256.   eval "ac_cv_header_$ac_safe=no"
  1257. fi
  1258. rm -f conftest*
  1259. fi
  1260. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1261.   echo "$ac_t""yes" 1>&6
  1262.   :
  1263. else
  1264.   echo "$ac_t""no" 1>&6
  1265. cat >> confdefs.h <<\EOF
  1266. #define NO_LIMITS_H 1
  1267. EOF
  1268.  
  1269. fi
  1270.  
  1271. ac_safe=`echo "stdlib.h" | tr './\055' '___'`
  1272. echo $ac_n "checking for stdlib.h""... $ac_c" 1>&6
  1273. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1274.   echo $ac_n "(cached) $ac_c" 1>&6
  1275. else
  1276.   cat > conftest.$ac_ext <<EOF
  1277. #line 1278 "configure"
  1278. #include "confdefs.h"
  1279. #include <stdlib.h>
  1280. EOF
  1281. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1282. ac_err=`grep -v '^ *+' conftest.out`
  1283. if test -z "$ac_err"; then
  1284.   rm -rf conftest*
  1285.   eval "ac_cv_header_$ac_safe=yes"
  1286. else
  1287.   echo "$ac_err" >&5
  1288.   rm -rf conftest*
  1289.   eval "ac_cv_header_$ac_safe=no"
  1290. fi
  1291. rm -f conftest*
  1292. fi
  1293. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1294.   echo "$ac_t""yes" 1>&6
  1295.   tcl_ok=1
  1296. else
  1297.   echo "$ac_t""no" 1>&6
  1298. tcl_ok=0
  1299. fi
  1300.  
  1301. cat > conftest.$ac_ext <<EOF
  1302. #line 1303 "configure"
  1303. #include "confdefs.h"
  1304. #include <stdlib.h>
  1305. EOF
  1306. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1307.   egrep "strtol" >/dev/null 2>&1; then
  1308.   :
  1309. else
  1310.   rm -rf conftest*
  1311.   tcl_ok=0
  1312. fi
  1313. rm -f conftest*
  1314.  
  1315. cat > conftest.$ac_ext <<EOF
  1316. #line 1317 "configure"
  1317. #include "confdefs.h"
  1318. #include <stdlib.h>
  1319. EOF
  1320. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1321.   egrep "strtoul" >/dev/null 2>&1; then
  1322.   :
  1323. else
  1324.   rm -rf conftest*
  1325.   tcl_ok=0
  1326. fi
  1327. rm -f conftest*
  1328.  
  1329. cat > conftest.$ac_ext <<EOF
  1330. #line 1331 "configure"
  1331. #include "confdefs.h"
  1332. #include <stdlib.h>
  1333. EOF
  1334. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1335.   egrep "strtod" >/dev/null 2>&1; then
  1336.   :
  1337. else
  1338.   rm -rf conftest*
  1339.   tcl_ok=0
  1340. fi
  1341. rm -f conftest*
  1342.  
  1343. if test $tcl_ok = 0; then
  1344.     cat >> confdefs.h <<\EOF
  1345. #define NO_STDLIB_H 1
  1346. EOF
  1347.  
  1348. fi
  1349. ac_safe=`echo "string.h" | tr './\055' '___'`
  1350. echo $ac_n "checking for string.h""... $ac_c" 1>&6
  1351. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1352.   echo $ac_n "(cached) $ac_c" 1>&6
  1353. else
  1354.   cat > conftest.$ac_ext <<EOF
  1355. #line 1356 "configure"
  1356. #include "confdefs.h"
  1357. #include <string.h>
  1358. EOF
  1359. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1360. ac_err=`grep -v '^ *+' conftest.out`
  1361. if test -z "$ac_err"; then
  1362.   rm -rf conftest*
  1363.   eval "ac_cv_header_$ac_safe=yes"
  1364. else
  1365.   echo "$ac_err" >&5
  1366.   rm -rf conftest*
  1367.   eval "ac_cv_header_$ac_safe=no"
  1368. fi
  1369. rm -f conftest*
  1370. fi
  1371. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1372.   echo "$ac_t""yes" 1>&6
  1373.   tcl_ok=1
  1374. else
  1375.   echo "$ac_t""no" 1>&6
  1376. tcl_ok=0
  1377. fi
  1378.  
  1379. cat > conftest.$ac_ext <<EOF
  1380. #line 1381 "configure"
  1381. #include "confdefs.h"
  1382. #include <string.h>
  1383. EOF
  1384. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1385.   egrep "strstr" >/dev/null 2>&1; then
  1386.   :
  1387. else
  1388.   rm -rf conftest*
  1389.   tcl_ok=0
  1390. fi
  1391. rm -f conftest*
  1392.  
  1393. cat > conftest.$ac_ext <<EOF
  1394. #line 1395 "configure"
  1395. #include "confdefs.h"
  1396. #include <string.h>
  1397. EOF
  1398. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1399.   egrep "strerror" >/dev/null 2>&1; then
  1400.   :
  1401. else
  1402.   rm -rf conftest*
  1403.   tcl_ok=0
  1404. fi
  1405. rm -f conftest*
  1406.  
  1407. if test $tcl_ok = 0; then
  1408.     cat >> confdefs.h <<\EOF
  1409. #define NO_STRING_H 1
  1410. EOF
  1411.  
  1412. fi
  1413. ac_safe=`echo "sys/wait.h" | tr './\055' '___'`
  1414. echo $ac_n "checking for sys/wait.h""... $ac_c" 1>&6
  1415. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1416.   echo $ac_n "(cached) $ac_c" 1>&6
  1417. else
  1418.   cat > conftest.$ac_ext <<EOF
  1419. #line 1420 "configure"
  1420. #include "confdefs.h"
  1421. #include <sys/wait.h>
  1422. EOF
  1423. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1424. ac_err=`grep -v '^ *+' conftest.out`
  1425. if test -z "$ac_err"; then
  1426.   rm -rf conftest*
  1427.   eval "ac_cv_header_$ac_safe=yes"
  1428. else
  1429.   echo "$ac_err" >&5
  1430.   rm -rf conftest*
  1431.   eval "ac_cv_header_$ac_safe=no"
  1432. fi
  1433. rm -f conftest*
  1434. fi
  1435. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1436.   echo "$ac_t""yes" 1>&6
  1437.   :
  1438. else
  1439.   echo "$ac_t""no" 1>&6
  1440. cat >> confdefs.h <<\EOF
  1441. #define NO_SYS_WAIT_H 1
  1442. EOF
  1443.  
  1444. fi
  1445.  
  1446. for ac_hdr in unistd.h
  1447. do
  1448. ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  1449. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1450. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1451.   echo $ac_n "(cached) $ac_c" 1>&6
  1452. else
  1453.   cat > conftest.$ac_ext <<EOF
  1454. #line 1455 "configure"
  1455. #include "confdefs.h"
  1456. #include <$ac_hdr>
  1457. EOF
  1458. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1459. ac_err=`grep -v '^ *+' conftest.out`
  1460. if test -z "$ac_err"; then
  1461.   rm -rf conftest*
  1462.   eval "ac_cv_header_$ac_safe=yes"
  1463. else
  1464.   echo "$ac_err" >&5
  1465.   rm -rf conftest*
  1466.   eval "ac_cv_header_$ac_safe=no"
  1467. fi
  1468. rm -f conftest*
  1469. fi
  1470. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1471.   echo "$ac_t""yes" 1>&6
  1472.     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
  1473.   cat >> confdefs.h <<EOF
  1474. #define $ac_tr_hdr 1
  1475. EOF
  1476.  
  1477. else
  1478.   echo "$ac_t""no" 1>&6
  1479. fi
  1480. done
  1481.  
  1482.  
  1483. #--------------------------------------------------------------------
  1484. #    Include sys/select.h if it exists and if it supplies things
  1485. #    that appear to be useful and aren't already in sys/types.h.
  1486. #    This appears to be true only on the RS/6000 under AIX.  Some
  1487. #    systems like OSF/1 have a sys/select.h that's of no use, and
  1488. #    other systems like SCO UNIX have a sys/select.h that's
  1489. #    pernicious.  If "fd_set" isn't defined anywhere then set a
  1490. #    special flag.
  1491. #--------------------------------------------------------------------
  1492.  
  1493. echo $ac_n "checking fd_set and sys/select""... $ac_c" 1>&6
  1494. cat > conftest.$ac_ext <<EOF
  1495. #line 1496 "configure"
  1496. #include "confdefs.h"
  1497. #include <sys/types.h>
  1498. int main() { return 0; }
  1499. int t() {
  1500. fd_set readMask, writeMask;
  1501. ; return 0; }
  1502. EOF
  1503. if eval $ac_compile; then
  1504.   rm -rf conftest*
  1505.   tk_ok=yes
  1506. else
  1507.   rm -rf conftest*
  1508.   tk_ok=no
  1509. fi
  1510. rm -f conftest*
  1511.  
  1512. if test $tk_ok = no; then
  1513.     cat > conftest.$ac_ext <<EOF
  1514. #line 1515 "configure"
  1515. #include "confdefs.h"
  1516. #include <sys/select.h>
  1517. EOF
  1518. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1519.   egrep "fd_mask" >/dev/null 2>&1; then
  1520.   rm -rf conftest*
  1521.   tk_ok=yes
  1522. fi
  1523. rm -f conftest*
  1524.  
  1525.     if test $tk_ok = yes; then
  1526.     cat >> confdefs.h <<\EOF
  1527. #define HAVE_SYS_SELECT_H 1
  1528. EOF
  1529.  
  1530.     fi
  1531. fi
  1532. echo "$ac_t""$tk_ok" 1>&6
  1533. if test $tk_ok = no; then
  1534.     cat >> confdefs.h <<\EOF
  1535. #define NO_FD_SET 1
  1536. EOF
  1537.  
  1538. fi
  1539.  
  1540. #------------------------------------------------------------------------------
  1541. #       Find out all about time handling differences.
  1542. #------------------------------------------------------------------------------
  1543.  
  1544. for ac_hdr in sys/time.h
  1545. do
  1546. ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  1547. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1548. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1549.   echo $ac_n "(cached) $ac_c" 1>&6
  1550. else
  1551.   cat > conftest.$ac_ext <<EOF
  1552. #line 1553 "configure"
  1553. #include "confdefs.h"
  1554. #include <$ac_hdr>
  1555. EOF
  1556. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1557. ac_err=`grep -v '^ *+' conftest.out`
  1558. if test -z "$ac_err"; then
  1559.   rm -rf conftest*
  1560.   eval "ac_cv_header_$ac_safe=yes"
  1561. else
  1562.   echo "$ac_err" >&5
  1563.   rm -rf conftest*
  1564.   eval "ac_cv_header_$ac_safe=no"
  1565. fi
  1566. rm -f conftest*
  1567. fi
  1568. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1569.   echo "$ac_t""yes" 1>&6
  1570.     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
  1571.   cat >> confdefs.h <<EOF
  1572. #define $ac_tr_hdr 1
  1573. EOF
  1574.  
  1575. else
  1576.   echo "$ac_t""no" 1>&6
  1577. fi
  1578. done
  1579.  
  1580. echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
  1581. if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
  1582.   echo $ac_n "(cached) $ac_c" 1>&6
  1583. else
  1584.   cat > conftest.$ac_ext <<EOF
  1585. #line 1586 "configure"
  1586. #include "confdefs.h"
  1587. #include <sys/types.h>
  1588. #include <sys/time.h>
  1589. #include <time.h>
  1590. int main() { return 0; }
  1591. int t() {
  1592. struct tm *tp;
  1593. ; return 0; }
  1594. EOF
  1595. if eval $ac_compile; then
  1596.   rm -rf conftest*
  1597.   ac_cv_header_time=yes
  1598. else
  1599.   rm -rf conftest*
  1600.   ac_cv_header_time=no
  1601. fi
  1602. rm -f conftest*
  1603.  
  1604. fi
  1605.  
  1606. echo "$ac_t""$ac_cv_header_time" 1>&6
  1607. if test $ac_cv_header_time = yes; then
  1608.   cat >> confdefs.h <<\EOF
  1609. #define TIME_WITH_SYS_TIME 1
  1610. EOF
  1611.  
  1612. fi
  1613.  
  1614. echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
  1615. if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
  1616.   echo $ac_n "(cached) $ac_c" 1>&6
  1617. else
  1618.   cat > conftest.$ac_ext <<EOF
  1619. #line 1620 "configure"
  1620. #include "confdefs.h"
  1621. #include <sys/types.h>
  1622. #include <time.h>
  1623. int main() { return 0; }
  1624. int t() {
  1625. struct tm *tp; tp->tm_sec;
  1626. ; return 0; }
  1627. EOF
  1628. if eval $ac_compile; then
  1629.   rm -rf conftest*
  1630.   ac_cv_struct_tm=time.h
  1631. else
  1632.   rm -rf conftest*
  1633.   ac_cv_struct_tm=sys/time.h
  1634. fi
  1635. rm -f conftest*
  1636.  
  1637. fi
  1638.  
  1639. echo "$ac_t""$ac_cv_struct_tm" 1>&6
  1640. if test $ac_cv_struct_tm = sys/time.h; then
  1641.   cat >> confdefs.h <<\EOF
  1642. #define TM_IN_SYS_TIME 1
  1643. EOF
  1644.  
  1645. fi
  1646.  
  1647. echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
  1648. if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
  1649.   echo $ac_n "(cached) $ac_c" 1>&6
  1650. else
  1651.   cat > conftest.$ac_ext <<EOF
  1652. #line 1653 "configure"
  1653. #include "confdefs.h"
  1654. #include <sys/types.h>
  1655. #include <$ac_cv_struct_tm>
  1656. int main() { return 0; }
  1657. int t() {
  1658. struct tm tm; tm.tm_zone;
  1659. ; return 0; }
  1660. EOF
  1661. if eval $ac_compile; then
  1662.   rm -rf conftest*
  1663.   ac_cv_struct_tm_zone=yes
  1664. else
  1665.   rm -rf conftest*
  1666.   ac_cv_struct_tm_zone=no
  1667. fi
  1668. rm -f conftest*
  1669.  
  1670. fi
  1671.  
  1672. echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
  1673. if test "$ac_cv_struct_tm_zone" = yes; then
  1674.   cat >> confdefs.h <<\EOF
  1675. #define HAVE_TM_ZONE 1
  1676. EOF
  1677.  
  1678. else
  1679.   echo $ac_n "checking for tzname""... $ac_c" 1>&6
  1680. if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
  1681.   echo $ac_n "(cached) $ac_c" 1>&6
  1682. else
  1683.   cat > conftest.$ac_ext <<EOF
  1684. #line 1685 "configure"
  1685. #include "confdefs.h"
  1686. #include <time.h>
  1687. #ifndef tzname /* For SGI.  */
  1688. extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
  1689. #endif
  1690. int main() { return 0; }
  1691. int t() {
  1692. atoi(*tzname);
  1693. ; return 0; }
  1694. EOF
  1695. if eval $ac_link; then
  1696.   rm -rf conftest*
  1697.   ac_cv_var_tzname=yes
  1698. else
  1699.   rm -rf conftest*
  1700.   ac_cv_var_tzname=no
  1701. fi
  1702. rm -f conftest*
  1703.  
  1704. fi
  1705.  
  1706. echo "$ac_t""$ac_cv_var_tzname" 1>&6
  1707.   if test $ac_cv_var_tzname = yes; then
  1708.     cat >> confdefs.h <<\EOF
  1709. #define HAVE_TZNAME 1
  1710. EOF
  1711.  
  1712.   fi
  1713. fi
  1714.  
  1715.  
  1716. echo $ac_n "checking tm_tzadj in struct tm""... $ac_c" 1>&6
  1717. cat > conftest.$ac_ext <<EOF
  1718. #line 1719 "configure"
  1719. #include "confdefs.h"
  1720. #include <time.h>
  1721. int main() { return 0; }
  1722. int t() {
  1723. struct tm tm; tm.tm_tzadj;
  1724. ; return 0; }
  1725. EOF
  1726. if eval $ac_compile; then
  1727.   rm -rf conftest*
  1728.   cat >> confdefs.h <<\EOF
  1729. #define HAVE_TM_TZADJ 1
  1730. EOF
  1731.  
  1732.          echo "$ac_t""yes" 1>&6
  1733. else
  1734.   rm -rf conftest*
  1735.   echo "$ac_t""no" 1>&6
  1736. fi
  1737. rm -f conftest*
  1738.  
  1739.  
  1740. echo $ac_n "checking tm_gmtoff in struct tm""... $ac_c" 1>&6
  1741. cat > conftest.$ac_ext <<EOF
  1742. #line 1743 "configure"
  1743. #include "confdefs.h"
  1744. #include <time.h>
  1745. int main() { return 0; }
  1746. int t() {
  1747. struct tm tm; tm.tm_gmtoff;
  1748. ; return 0; }
  1749. EOF
  1750. if eval $ac_compile; then
  1751.   rm -rf conftest*
  1752.   cat >> confdefs.h <<\EOF
  1753. #define HAVE_TM_GMTOFF 1
  1754. EOF
  1755.  
  1756.          echo "$ac_t""yes" 1>&6
  1757. else
  1758.   rm -rf conftest*
  1759.   echo "$ac_t""no" 1>&6
  1760. fi
  1761. rm -f conftest*
  1762.  
  1763.  
  1764. #
  1765. # Its important to include time.h in this check, as some systems (like convex)
  1766. # have timezone functions, etc.
  1767. #
  1768. echo $ac_n "checking timezone variable""... $ac_c" 1>&6
  1769. cat > conftest.$ac_ext <<EOF
  1770. #line 1771 "configure"
  1771. #include "confdefs.h"
  1772. #include <time.h>
  1773. int main() { return 0; }
  1774. int t() {
  1775. extern long timezone;
  1776.          timezone += 1;
  1777.          exit (0);
  1778. ; return 0; }
  1779. EOF
  1780. if eval $ac_compile; then
  1781.   rm -rf conftest*
  1782.   cat >> confdefs.h <<\EOF
  1783. #define HAVE_TIMEZONE_VAR 1
  1784. EOF
  1785.  
  1786.          echo "$ac_t""yes" 1>&6
  1787. else
  1788.   rm -rf conftest*
  1789.   echo "$ac_t""no" 1>&6
  1790. fi
  1791. rm -f conftest*
  1792.  
  1793.  
  1794. #--------------------------------------------------------------------
  1795. #    On some systems strstr is broken: it returns a pointer even
  1796. #    even if the original string is empty.
  1797. #--------------------------------------------------------------------
  1798.  
  1799. echo $ac_n "checking proper strstr implementation""... $ac_c" 1>&6
  1800. if test "$cross_compiling" = yes; then
  1801.   tcl_ok=no
  1802. else
  1803. cat > conftest.$ac_ext <<EOF
  1804. #line 1805 "configure"
  1805. #include "confdefs.h"
  1806.  
  1807. extern int strstr();
  1808. int main()
  1809. {
  1810.     exit(strstr("\0test", "test") ? 1 : 0);
  1811. }
  1812.  
  1813. EOF
  1814. eval $ac_link
  1815. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1816.   tcl_ok=yes
  1817. else
  1818.   tcl_ok=no
  1819. fi
  1820. fi
  1821. rm -fr conftest*
  1822. if test $tcl_ok = yes; then
  1823.     echo "$ac_t""yes" 1>&6
  1824. else
  1825.     echo "$ac_t""broken, using substitute" 1>&6
  1826.     LIBOBJS="$LIBOBJS strstr.o"
  1827. fi
  1828.  
  1829. #--------------------------------------------------------------------
  1830. #    Check for strtoul function.  This is tricky because under some
  1831. #    versions of AIX strtoul returns an incorrect terminator
  1832. #    pointer for the string "0".
  1833. #--------------------------------------------------------------------
  1834.  
  1835. echo $ac_n "checking for strtoul""... $ac_c" 1>&6
  1836. if eval "test \"`echo '$''{'ac_cv_func_strtoul'+set}'`\" = set"; then
  1837.   echo $ac_n "(cached) $ac_c" 1>&6
  1838. else
  1839.   cat > conftest.$ac_ext <<EOF
  1840. #line 1841 "configure"
  1841. #include "confdefs.h"
  1842. /* System header to define __stub macros and hopefully few prototypes,
  1843.     which can conflict with char strtoul(); below.  */
  1844. #include <assert.h>
  1845. /* Override any gcc2 internal prototype to avoid an error.  */
  1846. char strtoul();
  1847.  
  1848. int main() { return 0; }
  1849. int t() {
  1850.  
  1851. /* The GNU C library defines this for functions which it implements
  1852.     to always fail with ENOSYS.  Some functions are actually named
  1853.     something starting with __ and the normal name is an alias.  */
  1854. #if defined (__stub_strtoul) || defined (__stub___strtoul)
  1855. choke me
  1856. #else
  1857. strtoul();
  1858. #endif
  1859.  
  1860. ; return 0; }
  1861. EOF
  1862. if eval $ac_link; then
  1863.   rm -rf conftest*
  1864.   eval "ac_cv_func_strtoul=yes"
  1865. else
  1866.   rm -rf conftest*
  1867.   eval "ac_cv_func_strtoul=no"
  1868. fi
  1869. rm -f conftest*
  1870.  
  1871. fi
  1872. if eval "test \"`echo '$ac_cv_func_'strtoul`\" = yes"; then
  1873.   echo "$ac_t""yes" 1>&6
  1874.   tcl_ok=1
  1875. else
  1876.   echo "$ac_t""no" 1>&6
  1877. tcl_ok=0
  1878. fi
  1879.  
  1880. if test "$cross_compiling" = yes; then
  1881.   tcl_ok=0
  1882. else
  1883. cat > conftest.$ac_ext <<EOF
  1884. #line 1885 "configure"
  1885. #include "confdefs.h"
  1886.  
  1887. extern int strtoul();
  1888. int main()
  1889. {
  1890.     char *string = "0";
  1891.     char *term;
  1892.     int value;
  1893.     value = strtoul(string, &term, 0);
  1894.     if ((value != 0) || (term != (string+1))) {
  1895.         exit(1);
  1896.     }
  1897.     exit(0);
  1898. }
  1899. EOF
  1900. eval $ac_link
  1901. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1902.   :
  1903. else
  1904.   tcl_ok=0
  1905. fi
  1906. fi
  1907. rm -fr conftest*
  1908. if test "$tcl_ok" = 0; then
  1909.     test -n "$verbose" && echo "    Adding strtoul.o."
  1910.     LIBOBJS="$LIBOBJS strtoul.o"
  1911. fi
  1912.  
  1913. #--------------------------------------------------------------------
  1914. #    Check for the strtod function.  This is tricky because in some
  1915. #    versions of Linux strtod mis-parses strings starting with "+".
  1916. #--------------------------------------------------------------------
  1917.  
  1918. echo $ac_n "checking for strtod""... $ac_c" 1>&6
  1919. if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then
  1920.   echo $ac_n "(cached) $ac_c" 1>&6
  1921. else
  1922.   cat > conftest.$ac_ext <<EOF
  1923. #line 1924 "configure"
  1924. #include "confdefs.h"
  1925. /* System header to define __stub macros and hopefully few prototypes,
  1926.     which can conflict with char strtod(); below.  */
  1927. #include <assert.h>
  1928. /* Override any gcc2 internal prototype to avoid an error.  */
  1929. char strtod();
  1930.  
  1931. int main() { return 0; }
  1932. int t() {
  1933.  
  1934. /* The GNU C library defines this for functions which it implements
  1935.     to always fail with ENOSYS.  Some functions are actually named
  1936.     something starting with __ and the normal name is an alias.  */
  1937. #if defined (__stub_strtod) || defined (__stub___strtod)
  1938. choke me
  1939. #else
  1940. strtod();
  1941. #endif
  1942.  
  1943. ; return 0; }
  1944. EOF
  1945. if eval $ac_link; then
  1946.   rm -rf conftest*
  1947.   eval "ac_cv_func_strtod=yes"
  1948. else
  1949.   rm -rf conftest*
  1950.   eval "ac_cv_func_strtod=no"
  1951. fi
  1952. rm -f conftest*
  1953.  
  1954. fi
  1955. if eval "test \"`echo '$ac_cv_func_'strtod`\" = yes"; then
  1956.   echo "$ac_t""yes" 1>&6
  1957.   tcl_ok=1
  1958. else
  1959.   echo "$ac_t""no" 1>&6
  1960. tcl_ok=0
  1961. fi
  1962.  
  1963. if test "$cross_compiling" = yes; then
  1964.   tcl_ok=0
  1965. else
  1966. cat > conftest.$ac_ext <<EOF
  1967. #line 1968 "configure"
  1968. #include "confdefs.h"
  1969.  
  1970. extern double strtod();
  1971. int main()
  1972. {
  1973.     char *string = " +69";
  1974.     char *term;
  1975.     double value;
  1976.     value = strtod(string, &term);
  1977.     if ((value != 69) || (term != (string+4))) {
  1978.     exit(1);
  1979.     }
  1980.     exit(0);
  1981. }
  1982. EOF
  1983. eval $ac_link
  1984. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1985.   :
  1986. else
  1987.   tcl_ok=0
  1988. fi
  1989. fi
  1990. rm -fr conftest*
  1991. if test "$tcl_ok" = 0; then
  1992.     test -n "$verbose" && echo "    Adding strtod.o."
  1993.     LIBOBJS="$LIBOBJS strtod.o"
  1994. fi
  1995.  
  1996. #--------------------------------------------------------------------
  1997. #    Under Solaris 2.4, strtod returns the wrong value for the
  1998. #    terminating character under some conditions.  Check for this
  1999. #    and if the problem exists use a substitute procedure
  2000. #    "fixstrtod" that corrects the error.
  2001. #--------------------------------------------------------------------
  2002.  
  2003. echo $ac_n "checking for strtod""... $ac_c" 1>&6
  2004. if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then
  2005.   echo $ac_n "(cached) $ac_c" 1>&6
  2006. else
  2007.   cat > conftest.$ac_ext <<EOF
  2008. #line 2009 "configure"
  2009. #include "confdefs.h"
  2010. /* System header to define __stub macros and hopefully few prototypes,
  2011.     which can conflict with char strtod(); below.  */
  2012. #include <assert.h>
  2013. /* Override any gcc2 internal prototype to avoid an error.  */
  2014. char strtod();
  2015.  
  2016. int main() { return 0; }
  2017. int t() {
  2018.  
  2019. /* The GNU C library defines this for functions which it implements
  2020.     to always fail with ENOSYS.  Some functions are actually named
  2021.     something starting with __ and the normal name is an alias.  */
  2022. #if defined (__stub_strtod) || defined (__stub___strtod)
  2023. choke me
  2024. #else
  2025. strtod();
  2026. #endif
  2027.  
  2028. ; return 0; }
  2029. EOF
  2030. if eval $ac_link; then
  2031.   rm -rf conftest*
  2032.   eval "ac_cv_func_strtod=yes"
  2033. else
  2034.   rm -rf conftest*
  2035.   eval "ac_cv_func_strtod=no"
  2036. fi
  2037. rm -f conftest*
  2038.  
  2039. fi
  2040. if eval "test \"`echo '$ac_cv_func_'strtod`\" = yes"; then
  2041.   echo "$ac_t""yes" 1>&6
  2042.   tcl_strtod=1
  2043. else
  2044.   echo "$ac_t""no" 1>&6
  2045. tcl_strtod=0
  2046. fi
  2047.  
  2048. if test "$tcl_strtod" = 1; then
  2049.     echo $ac_n "checking for Solaris strtod bug""... $ac_c" 1>&6
  2050.     if test "$cross_compiling" = yes; then
  2051.   tcl_ok=0
  2052. else
  2053. cat > conftest.$ac_ext <<EOF
  2054. #line 2055 "configure"
  2055. #include "confdefs.h"
  2056.  
  2057.     extern double strtod();
  2058.     int main()
  2059.     {
  2060.         char *string = "NaN";
  2061.         char *term;
  2062.         strtod(string, &term);
  2063.         if ((term != string) && (term[-1] == 0)) {
  2064.         exit(1);
  2065.         }
  2066.         exit(0);
  2067.     }
  2068. EOF
  2069. eval $ac_link
  2070. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  2071.   tcl_ok=1
  2072. else
  2073.   tcl_ok=0
  2074. fi
  2075. fi
  2076. rm -fr conftest*
  2077.     if test $tcl_ok = 1; then
  2078.     echo "$ac_t""ok" 1>&6
  2079.     else
  2080.     echo "$ac_t""buggy" 1>&6
  2081.     LIBOBJS="$LIBOBJS fixstrtod.o"
  2082.     cat >> confdefs.h <<\EOF
  2083. #define strtod fixstrtod
  2084. EOF
  2085.  
  2086.     fi
  2087. fi
  2088.  
  2089. #--------------------------------------------------------------------
  2090. #    Check for various typedefs and provide substitutes if
  2091. #    they don't exist.
  2092. #--------------------------------------------------------------------
  2093.  
  2094. echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  2095. if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  2096.   echo $ac_n "(cached) $ac_c" 1>&6
  2097. else
  2098.   cat > conftest.$ac_ext <<EOF
  2099. #line 2100 "configure"
  2100. #include "confdefs.h"
  2101. #include <stdlib.h>
  2102. #include <stdarg.h>
  2103. #include <string.h>
  2104. #include <float.h>
  2105. EOF
  2106. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2107. ac_err=`grep -v '^ *+' conftest.out`
  2108. if test -z "$ac_err"; then
  2109.   rm -rf conftest*
  2110.   ac_cv_header_stdc=yes
  2111. else
  2112.   echo "$ac_err" >&5
  2113.   rm -rf conftest*
  2114.   ac_cv_header_stdc=no
  2115. fi
  2116. rm -f conftest*
  2117.  
  2118. if test $ac_cv_header_stdc = yes; then
  2119.   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  2120. cat > conftest.$ac_ext <<EOF
  2121. #line 2122 "configure"
  2122. #include "confdefs.h"
  2123. #include <string.h>
  2124. EOF
  2125. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2126.   egrep "memchr" >/dev/null 2>&1; then
  2127.   :
  2128. else
  2129.   rm -rf conftest*
  2130.   ac_cv_header_stdc=no
  2131. fi
  2132. rm -f conftest*
  2133.  
  2134. fi
  2135.  
  2136. if test $ac_cv_header_stdc = yes; then
  2137.   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  2138. cat > conftest.$ac_ext <<EOF
  2139. #line 2140 "configure"
  2140. #include "confdefs.h"
  2141. #include <stdlib.h>
  2142. EOF
  2143. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2144.   egrep "free" >/dev/null 2>&1; then
  2145.   :
  2146. else
  2147.   rm -rf conftest*
  2148.   ac_cv_header_stdc=no
  2149. fi
  2150. rm -f conftest*
  2151.  
  2152. fi
  2153.  
  2154. if test $ac_cv_header_stdc = yes; then
  2155.   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  2156. if test "$cross_compiling" = yes; then
  2157.   :
  2158. else
  2159. cat > conftest.$ac_ext <<EOF
  2160. #line 2161 "configure"
  2161. #include "confdefs.h"
  2162. #include <ctype.h>
  2163. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  2164. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  2165. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  2166. int main () { int i; for (i = 0; i < 256; i++)
  2167. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  2168. exit (0); }
  2169.  
  2170. EOF
  2171. eval $ac_link
  2172. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  2173.   :
  2174. else
  2175.   ac_cv_header_stdc=no
  2176. fi
  2177. fi
  2178. rm -fr conftest*
  2179. fi
  2180. fi
  2181.  
  2182. echo "$ac_t""$ac_cv_header_stdc" 1>&6
  2183. if test $ac_cv_header_stdc = yes; then
  2184.   cat >> confdefs.h <<\EOF
  2185. #define STDC_HEADERS 1
  2186. EOF
  2187.  
  2188. fi
  2189.  
  2190. echo $ac_n "checking for mode_t""... $ac_c" 1>&6
  2191. if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
  2192.   echo $ac_n "(cached) $ac_c" 1>&6
  2193. else
  2194.   cat > conftest.$ac_ext <<EOF
  2195. #line 2196 "configure"
  2196. #include "confdefs.h"
  2197. #include <sys/types.h>
  2198. #if STDC_HEADERS
  2199. #include <stdlib.h>
  2200. #endif
  2201. EOF
  2202. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2203.   egrep "mode_t" >/dev/null 2>&1; then
  2204.   rm -rf conftest*
  2205.   ac_cv_type_mode_t=yes
  2206. else
  2207.   rm -rf conftest*
  2208.   ac_cv_type_mode_t=no
  2209. fi
  2210. rm -f conftest*
  2211.  
  2212. fi
  2213. echo "$ac_t""$ac_cv_type_mode_t" 1>&6
  2214. if test $ac_cv_type_mode_t = no; then
  2215.   cat >> confdefs.h <<\EOF
  2216. #define mode_t int
  2217. EOF
  2218.  
  2219. fi
  2220.  
  2221. echo $ac_n "checking for pid_t""... $ac_c" 1>&6
  2222. if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
  2223.   echo $ac_n "(cached) $ac_c" 1>&6
  2224. else
  2225.   cat > conftest.$ac_ext <<EOF
  2226. #line 2227 "configure"
  2227. #include "confdefs.h"
  2228. #include <sys/types.h>
  2229. #if STDC_HEADERS
  2230. #include <stdlib.h>
  2231. #endif
  2232. EOF
  2233. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2234.   egrep "pid_t" >/dev/null 2>&1; then
  2235.   rm -rf conftest*
  2236.   ac_cv_type_pid_t=yes
  2237. else
  2238.   rm -rf conftest*
  2239.   ac_cv_type_pid_t=no
  2240. fi
  2241. rm -f conftest*
  2242.  
  2243. fi
  2244. echo "$ac_t""$ac_cv_type_pid_t" 1>&6
  2245. if test $ac_cv_type_pid_t = no; then
  2246.   cat >> confdefs.h <<\EOF
  2247. #define pid_t int
  2248. EOF
  2249.  
  2250. fi
  2251.  
  2252. echo $ac_n "checking for size_t""... $ac_c" 1>&6
  2253. if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
  2254.   echo $ac_n "(cached) $ac_c" 1>&6
  2255. else
  2256.   cat > conftest.$ac_ext <<EOF
  2257. #line 2258 "configure"
  2258. #include "confdefs.h"
  2259. #include <sys/types.h>
  2260. #if STDC_HEADERS
  2261. #include <stdlib.h>
  2262. #endif
  2263. EOF
  2264. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2265.   egrep "size_t" >/dev/null 2>&1; then
  2266.   rm -rf conftest*
  2267.   ac_cv_type_size_t=yes
  2268. else
  2269.   rm -rf conftest*
  2270.   ac_cv_type_size_t=no
  2271. fi
  2272. rm -f conftest*
  2273.  
  2274. fi
  2275. echo "$ac_t""$ac_cv_type_size_t" 1>&6
  2276. if test $ac_cv_type_size_t = no; then
  2277.   cat >> confdefs.h <<\EOF
  2278. #define size_t unsigned
  2279. EOF
  2280.  
  2281. fi
  2282.  
  2283. echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
  2284. if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
  2285.   echo $ac_n "(cached) $ac_c" 1>&6
  2286. else
  2287.   cat > conftest.$ac_ext <<EOF
  2288. #line 2289 "configure"
  2289. #include "confdefs.h"
  2290. #include <sys/types.h>
  2291. EOF
  2292. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2293.   egrep "uid_t" >/dev/null 2>&1; then
  2294.   rm -rf conftest*
  2295.   ac_cv_type_uid_t=yes
  2296. else
  2297.   rm -rf conftest*
  2298.   ac_cv_type_uid_t=no
  2299. fi
  2300. rm -f conftest*
  2301.  
  2302. fi
  2303.  
  2304. echo "$ac_t""$ac_cv_type_uid_t" 1>&6
  2305. if test $ac_cv_type_uid_t = no; then
  2306.   cat >> confdefs.h <<\EOF
  2307. #define uid_t int
  2308. EOF
  2309.  
  2310.   cat >> confdefs.h <<\EOF
  2311. #define gid_t int
  2312. EOF
  2313.  
  2314. fi
  2315.  
  2316.  
  2317. #--------------------------------------------------------------------
  2318. #    If a system doesn't have an opendir function (man, that's old!)
  2319. #    then we have to supply a different version of dirent.h which
  2320. #    is compatible with the substitute version of opendir that's
  2321. #    provided.  This version only works with V7-style directories.
  2322. #--------------------------------------------------------------------
  2323.  
  2324. echo $ac_n "checking for opendir""... $ac_c" 1>&6
  2325. if eval "test \"`echo '$''{'ac_cv_func_opendir'+set}'`\" = set"; then
  2326.   echo $ac_n "(cached) $ac_c" 1>&6
  2327. else
  2328.   cat > conftest.$ac_ext <<EOF
  2329. #line 2330 "configure"
  2330. #include "confdefs.h"
  2331. /* System header to define __stub macros and hopefully few prototypes,
  2332.     which can conflict with char opendir(); below.  */
  2333. #include <assert.h>
  2334. /* Override any gcc2 internal prototype to avoid an error.  */
  2335. char opendir();
  2336.  
  2337. int main() { return 0; }
  2338. int t() {
  2339.  
  2340. /* The GNU C library defines this for functions which it implements
  2341.     to always fail with ENOSYS.  Some functions are actually named
  2342.     something starting with __ and the normal name is an alias.  */
  2343. #if defined (__stub_opendir) || defined (__stub___opendir)
  2344. choke me
  2345. #else
  2346. opendir();
  2347. #endif
  2348.  
  2349. ; return 0; }
  2350. EOF
  2351. if eval $ac_link; then
  2352.   rm -rf conftest*
  2353.   eval "ac_cv_func_opendir=yes"
  2354. else
  2355.   rm -rf conftest*
  2356.   eval "ac_cv_func_opendir=no"
  2357. fi
  2358. rm -f conftest*
  2359.  
  2360. fi
  2361. if eval "test \"`echo '$ac_cv_func_'opendir`\" = yes"; then
  2362.   echo "$ac_t""yes" 1>&6
  2363.   :
  2364. else
  2365.   echo "$ac_t""no" 1>&6
  2366. cat >> confdefs.h <<\EOF
  2367. #define USE_DIRENT2_H 1
  2368. EOF
  2369.  
  2370. fi
  2371.  
  2372.  
  2373. #--------------------------------------------------------------------
  2374. #    Check for the existence of sys_errlist (this is only needed if
  2375. #    there's no strerror, but I don't know how to conditionalize the
  2376. #    check).
  2377. #--------------------------------------------------------------------
  2378.  
  2379. echo $ac_n "checking sys_errlist""... $ac_c" 1>&6
  2380. cat > conftest.$ac_ext <<EOF
  2381. #line 2382 "configure"
  2382. #include "confdefs.h"
  2383.  
  2384. int main() { return 0; }
  2385. int t() {
  2386.  
  2387. extern char *sys_errlist[];
  2388. extern int sys_nerr;
  2389. sys_errlist[sys_nerr-1][0] = 0;
  2390.  
  2391. ; return 0; }
  2392. EOF
  2393. if eval $ac_link; then
  2394.   rm -rf conftest*
  2395.   tcl_ok=yes
  2396. else
  2397.   rm -rf conftest*
  2398.   tcl_ok=no
  2399. fi
  2400. rm -f conftest*
  2401.  
  2402. echo "$ac_t""$tcl_ok" 1>&6
  2403. if test $tcl_ok = no; then
  2404.     cat >> confdefs.h <<\EOF
  2405. #define NO_SYS_ERRLIST 1
  2406. EOF
  2407.  
  2408. fi
  2409.  
  2410. #--------------------------------------------------------------------
  2411. #    The check below checks whether <sys/wait.h> defines the type
  2412. #    "union wait" correctly.  It's needed because of weirdness in
  2413. #    HP-UX where "union wait" is defined in both the BSD and SYS-V
  2414. #    environments.  Checking the usability of WIFEXITED seems to do
  2415. #    the trick.
  2416. #--------------------------------------------------------------------
  2417.  
  2418. echo $ac_n "checking union wait""... $ac_c" 1>&6
  2419. cat > conftest.$ac_ext <<EOF
  2420. #line 2421 "configure"
  2421. #include "confdefs.h"
  2422. #include <sys/types.h> 
  2423. #include <sys/wait.h>
  2424. int main() { return 0; }
  2425. int t() {
  2426.  
  2427. union wait x;
  2428. WIFEXITED(x);        /* Generates compiler error if WIFEXITED
  2429.              * uses an int. */
  2430.  
  2431. ; return 0; }
  2432. EOF
  2433. if eval $ac_link; then
  2434.   rm -rf conftest*
  2435.   tcl_ok=yes
  2436. else
  2437.   rm -rf conftest*
  2438.   tcl_ok=no
  2439. fi
  2440. rm -f conftest*
  2441.  
  2442. echo "$ac_t""$tcl_ok" 1>&6
  2443. if test $tcl_ok = no; then
  2444.     cat >> confdefs.h <<\EOF
  2445. #define NO_UNION_WAIT 1
  2446. EOF
  2447.  
  2448. fi
  2449.  
  2450. #--------------------------------------------------------------------
  2451. #    Check to see whether the system supports the matherr function
  2452. #    and its associated type "struct exception".
  2453. #--------------------------------------------------------------------
  2454.  
  2455. echo $ac_n "checking matherr support""... $ac_c" 1>&6
  2456. cat > conftest.$ac_ext <<EOF
  2457. #line 2458 "configure"
  2458. #include "confdefs.h"
  2459. #include <math.h>
  2460. int main() { return 0; }
  2461. int t() {
  2462.  
  2463. struct exception x;
  2464. x.type = DOMAIN;
  2465. x.type = SING;
  2466.  
  2467. ; return 0; }
  2468. EOF
  2469. if eval $ac_compile; then
  2470.   rm -rf conftest*
  2471.   tcl_ok=yes
  2472. else
  2473.   rm -rf conftest*
  2474.   tcl_ok=no
  2475. fi
  2476. rm -f conftest*
  2477.  
  2478. echo "$ac_t""$tcl_ok" 1>&6
  2479. if test $tcl_ok = yes; then
  2480.     cat >> confdefs.h <<\EOF
  2481. #define NEED_MATHERR 1
  2482. EOF
  2483.  
  2484. fi
  2485.  
  2486. #--------------------------------------------------------------------
  2487. #    Check to see whether the system provides a vfork kernel call.
  2488. #    If not, then use fork instead.  Also, check for a problem with
  2489. #    vforks and signals that can cause core dumps if a vforked child
  2490. #    resets a signal handler.  If the problem exists, then use fork
  2491. #    instead of vfork.
  2492. #--------------------------------------------------------------------
  2493.  
  2494. echo $ac_n "checking for vfork""... $ac_c" 1>&6
  2495. if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
  2496.   echo $ac_n "(cached) $ac_c" 1>&6
  2497. else
  2498.   cat > conftest.$ac_ext <<EOF
  2499. #line 2500 "configure"
  2500. #include "confdefs.h"
  2501. /* System header to define __stub macros and hopefully few prototypes,
  2502.     which can conflict with char vfork(); below.  */
  2503. #include <assert.h>
  2504. /* Override any gcc2 internal prototype to avoid an error.  */
  2505. char vfork();
  2506.  
  2507. int main() { return 0; }
  2508. int t() {
  2509.  
  2510. /* The GNU C library defines this for functions which it implements
  2511.     to always fail with ENOSYS.  Some functions are actually named
  2512.     something starting with __ and the normal name is an alias.  */
  2513. #if defined (__stub_vfork) || defined (__stub___vfork)
  2514. choke me
  2515. #else
  2516. vfork();
  2517. #endif
  2518.  
  2519. ; return 0; }
  2520. EOF
  2521. if eval $ac_link; then
  2522.   rm -rf conftest*
  2523.   eval "ac_cv_func_vfork=yes"
  2524. else
  2525.   rm -rf conftest*
  2526.   eval "ac_cv_func_vfork=no"
  2527. fi
  2528. rm -f conftest*
  2529.  
  2530. fi
  2531. if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
  2532.   echo "$ac_t""yes" 1>&6
  2533.   tcl_ok=1
  2534. else
  2535.   echo "$ac_t""no" 1>&6
  2536. tcl_ok=0
  2537. fi
  2538.  
  2539. if test "$tcl_ok" = 1; then
  2540.     echo $ac_n "checking vfork/signal bug""... $ac_c" 1>&6;
  2541.     if test "$cross_compiling" = yes; then
  2542.   tcl_ok=0
  2543. else
  2544. cat > conftest.$ac_ext <<EOF
  2545. #line 2546 "configure"
  2546. #include "confdefs.h"
  2547.  
  2548.     #include <stdio.h>
  2549.     #include <signal.h>
  2550.     #include <sys/wait.h>
  2551.     int gotSignal = 0;
  2552.     sigProc(sig)
  2553.         int sig;
  2554.     {
  2555.         gotSignal = 1;
  2556.     }
  2557.     main()
  2558.     {
  2559.         int pid, sts;
  2560.         (void) signal(SIGCHLD, sigProc);
  2561.         pid = vfork();
  2562.         if (pid <  0) {
  2563.         exit(1);
  2564.         } else if (pid == 0) {
  2565.         (void) signal(SIGCHLD, SIG_DFL);
  2566.         _exit(0);
  2567.         } else {
  2568.         (void) wait(&sts);
  2569.         }
  2570.         exit((gotSignal) ? 0 : 1);
  2571.     }
  2572. EOF
  2573. eval $ac_link
  2574. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  2575.   tcl_ok=1
  2576. else
  2577.   tcl_ok=0
  2578. fi
  2579. fi
  2580. rm -fr conftest*
  2581.     if test "$tcl_ok" = 1; then
  2582.     echo "$ac_t""ok" 1>&6
  2583.     else
  2584.     echo "$ac_t""buggy, using fork instead" 1>&6
  2585.     fi
  2586. fi
  2587. rm -f core
  2588. if test "$tcl_ok" = 0; then
  2589.     cat >> confdefs.h <<\EOF
  2590. #define vfork fork
  2591. EOF
  2592.  
  2593. fi
  2594.  
  2595. #--------------------------------------------------------------------
  2596. #    Check whether there is an strncasecmp function on this system.
  2597. #    This is a bit tricky because under SCO it's in -lsocket and
  2598. #    under Sequent Dynix it's in -linet.
  2599. #--------------------------------------------------------------------
  2600.  
  2601. echo $ac_n "checking for strncasecmp""... $ac_c" 1>&6
  2602. if eval "test \"`echo '$''{'ac_cv_func_strncasecmp'+set}'`\" = set"; then
  2603.   echo $ac_n "(cached) $ac_c" 1>&6
  2604. else
  2605.   cat > conftest.$ac_ext <<EOF
  2606. #line 2607 "configure"
  2607. #include "confdefs.h"
  2608. /* System header to define __stub macros and hopefully few prototypes,
  2609.     which can conflict with char strncasecmp(); below.  */
  2610. #include <assert.h>
  2611. /* Override any gcc2 internal prototype to avoid an error.  */
  2612. char strncasecmp();
  2613.  
  2614. int main() { return 0; }
  2615. int t() {
  2616.  
  2617. /* The GNU C library defines this for functions which it implements
  2618.     to always fail with ENOSYS.  Some functions are actually named
  2619.     something starting with __ and the normal name is an alias.  */
  2620. #if defined (__stub_strncasecmp) || defined (__stub___strncasecmp)
  2621. choke me
  2622. #else
  2623. strncasecmp();
  2624. #endif
  2625.  
  2626. ; return 0; }
  2627. EOF
  2628. if eval $ac_link; then
  2629.   rm -rf conftest*
  2630.   eval "ac_cv_func_strncasecmp=yes"
  2631. else
  2632.   rm -rf conftest*
  2633.   eval "ac_cv_func_strncasecmp=no"
  2634. fi
  2635. rm -f conftest*
  2636.  
  2637. fi
  2638. if eval "test \"`echo '$ac_cv_func_'strncasecmp`\" = yes"; then
  2639.   echo "$ac_t""yes" 1>&6
  2640.   tcl_ok=1
  2641. else
  2642.   echo "$ac_t""no" 1>&6
  2643. tcl_ok=0
  2644. fi
  2645.  
  2646. if test "$tcl_ok" = 0; then
  2647.     echo $ac_n "checking for -lsocket""... $ac_c" 1>&6
  2648. ac_lib_var=`echo socket | tr '.-/+' '___p'`
  2649. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2650.   echo $ac_n "(cached) $ac_c" 1>&6
  2651. else
  2652.   ac_save_LIBS="$LIBS"
  2653. LIBS="-lsocket  $LIBS"
  2654. cat > conftest.$ac_ext <<EOF
  2655. #line 2656 "configure"
  2656. #include "confdefs.h"
  2657.  
  2658. int main() { return 0; }
  2659. int t() {
  2660. strncasecmp()
  2661. ; return 0; }
  2662. EOF
  2663. if eval $ac_link; then
  2664.   rm -rf conftest*
  2665.   eval "ac_cv_lib_$ac_lib_var=yes"
  2666. else
  2667.   rm -rf conftest*
  2668.   eval "ac_cv_lib_$ac_lib_var=no"
  2669. fi
  2670. rm -f conftest*
  2671. LIBS="$ac_save_LIBS"
  2672.  
  2673. fi
  2674. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2675.   echo "$ac_t""yes" 1>&6
  2676.   tcl_ok=1
  2677. else
  2678.   echo "$ac_t""no" 1>&6
  2679. tcl_ok=0
  2680. fi
  2681.  
  2682. fi
  2683. if test "$tcl_ok" = 0; then
  2684.     echo $ac_n "checking for -linet""... $ac_c" 1>&6
  2685. ac_lib_var=`echo inet | tr '.-/+' '___p'`
  2686. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2687.   echo $ac_n "(cached) $ac_c" 1>&6
  2688. else
  2689.   ac_save_LIBS="$LIBS"
  2690. LIBS="-linet  $LIBS"
  2691. cat > conftest.$ac_ext <<EOF
  2692. #line 2693 "configure"
  2693. #include "confdefs.h"
  2694.  
  2695. int main() { return 0; }
  2696. int t() {
  2697. strncasecmp()
  2698. ; return 0; }
  2699. EOF
  2700. if eval $ac_link; then
  2701.   rm -rf conftest*
  2702.   eval "ac_cv_lib_$ac_lib_var=yes"
  2703. else
  2704.   rm -rf conftest*
  2705.   eval "ac_cv_lib_$ac_lib_var=no"
  2706. fi
  2707. rm -f conftest*
  2708. LIBS="$ac_save_LIBS"
  2709.  
  2710. fi
  2711. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2712.   echo "$ac_t""yes" 1>&6
  2713.   tcl_ok=1
  2714. else
  2715.   echo "$ac_t""no" 1>&6
  2716. tcl_ok=0
  2717. fi
  2718.  
  2719. fi
  2720. if test "$tcl_ok" = 0; then
  2721.     LIBOBJS="$LIBOBJS strncasecmp.o"
  2722. fi
  2723.  
  2724. #--------------------------------------------------------------------
  2725. #    The code below deals with several issues related to gettimeofday:
  2726. #    1. Some systems don't provide a gettimeofday function at all
  2727. #       (set NO_GETTOD if this is the case).
  2728. #    2. SGI systems don't use the BSD form of the gettimeofday function,
  2729. #       but they have a BSDgettimeofday function that can be used instead.
  2730. #    3. See if gettimeofday is declared in the <sys/time.h> header file.
  2731. #       if not, set the GETTOD_NOT_DECLARED flag so that tclPort.h can
  2732. #       declare it.
  2733. #--------------------------------------------------------------------
  2734.  
  2735. echo $ac_n "checking for BSDgettimeofday""... $ac_c" 1>&6
  2736. if eval "test \"`echo '$''{'ac_cv_func_BSDgettimeofday'+set}'`\" = set"; then
  2737.   echo $ac_n "(cached) $ac_c" 1>&6
  2738. else
  2739.   cat > conftest.$ac_ext <<EOF
  2740. #line 2741 "configure"
  2741. #include "confdefs.h"
  2742. /* System header to define __stub macros and hopefully few prototypes,
  2743.     which can conflict with char BSDgettimeofday(); below.  */
  2744. #include <assert.h>
  2745. /* Override any gcc2 internal prototype to avoid an error.  */
  2746. char BSDgettimeofday();
  2747.  
  2748. int main() { return 0; }
  2749. int t() {
  2750.  
  2751. /* The GNU C library defines this for functions which it implements
  2752.     to always fail with ENOSYS.  Some functions are actually named
  2753.     something starting with __ and the normal name is an alias.  */
  2754. #if defined (__stub_BSDgettimeofday) || defined (__stub___BSDgettimeofday)
  2755. choke me
  2756. #else
  2757. BSDgettimeofday();
  2758. #endif
  2759.  
  2760. ; return 0; }
  2761. EOF
  2762. if eval $ac_link; then
  2763.   rm -rf conftest*
  2764.   eval "ac_cv_func_BSDgettimeofday=yes"
  2765. else
  2766.   rm -rf conftest*
  2767.   eval "ac_cv_func_BSDgettimeofday=no"
  2768. fi
  2769. rm -f conftest*
  2770.  
  2771. fi
  2772. if eval "test \"`echo '$ac_cv_func_'BSDgettimeofday`\" = yes"; then
  2773.   echo "$ac_t""yes" 1>&6
  2774.   cat >> confdefs.h <<\EOF
  2775. #define HAVE_BSDGETTIMEOFDAY 1
  2776. EOF
  2777.  
  2778. else
  2779.   echo "$ac_t""no" 1>&6
  2780. echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6
  2781. if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+set}'`\" = set"; then
  2782.   echo $ac_n "(cached) $ac_c" 1>&6
  2783. else
  2784.   cat > conftest.$ac_ext <<EOF
  2785. #line 2786 "configure"
  2786. #include "confdefs.h"
  2787. /* System header to define __stub macros and hopefully few prototypes,
  2788.     which can conflict with char gettimeofday(); below.  */
  2789. #include <assert.h>
  2790. /* Override any gcc2 internal prototype to avoid an error.  */
  2791. char gettimeofday();
  2792.  
  2793. int main() { return 0; }
  2794. int t() {
  2795.  
  2796. /* The GNU C library defines this for functions which it implements
  2797.     to always fail with ENOSYS.  Some functions are actually named
  2798.     something starting with __ and the normal name is an alias.  */
  2799. #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
  2800. choke me
  2801. #else
  2802. gettimeofday();
  2803. #endif
  2804.  
  2805. ; return 0; }
  2806. EOF
  2807. if eval $ac_link; then
  2808.   rm -rf conftest*
  2809.   eval "ac_cv_func_gettimeofday=yes"
  2810. else
  2811.   rm -rf conftest*
  2812.   eval "ac_cv_func_gettimeofday=no"
  2813. fi
  2814. rm -f conftest*
  2815.  
  2816. fi
  2817. if eval "test \"`echo '$ac_cv_func_'gettimeofday`\" = yes"; then
  2818.   echo "$ac_t""yes" 1>&6
  2819.   :
  2820. else
  2821.   echo "$ac_t""no" 1>&6
  2822. cat >> confdefs.h <<\EOF
  2823. #define NO_GETTOD 1
  2824. EOF
  2825.  
  2826. fi
  2827.  
  2828. fi
  2829.  
  2830. echo $ac_n "checking for gettimeofday declaration""... $ac_c" 1>&6
  2831. cat > conftest.$ac_ext <<EOF
  2832. #line 2833 "configure"
  2833. #include "confdefs.h"
  2834. #include <sys/time.h>
  2835. EOF
  2836. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2837.   egrep "gettimeofday" >/dev/null 2>&1; then
  2838.   rm -rf conftest*
  2839.   echo "$ac_t""present" 1>&6
  2840. else
  2841.   rm -rf conftest*
  2842.   
  2843.     echo "$ac_t""missing" 1>&6
  2844.     cat >> confdefs.h <<\EOF
  2845. #define GETTOD_NOT_DECLARED 1
  2846. EOF
  2847.  
  2848.  
  2849. fi
  2850. rm -f conftest*
  2851.  
  2852.  
  2853. #--------------------------------------------------------------------
  2854. #    Interactive UNIX requires -linet instead of -lsocket, plus it
  2855. #    needs net/errno.h to define the socket-related error codes.
  2856. #--------------------------------------------------------------------
  2857.  
  2858. echo $ac_n "checking for -linet""... $ac_c" 1>&6
  2859. ac_lib_var=`echo inet | tr '.-/+' '___p'`
  2860. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2861.   echo $ac_n "(cached) $ac_c" 1>&6
  2862. else
  2863.   ac_save_LIBS="$LIBS"
  2864. LIBS="-linet  $LIBS"
  2865. cat > conftest.$ac_ext <<EOF
  2866. #line 2867 "configure"
  2867. #include "confdefs.h"
  2868.  
  2869. int main() { return 0; }
  2870. int t() {
  2871. main()
  2872. ; return 0; }
  2873. EOF
  2874. if eval $ac_link; then
  2875.   rm -rf conftest*
  2876.   eval "ac_cv_lib_$ac_lib_var=yes"
  2877. else
  2878.   rm -rf conftest*
  2879.   eval "ac_cv_lib_$ac_lib_var=no"
  2880. fi
  2881. rm -f conftest*
  2882. LIBS="$ac_save_LIBS"
  2883.  
  2884. fi
  2885. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2886.   echo "$ac_t""yes" 1>&6
  2887.   LIBS="$LIBS -linet"
  2888. else
  2889.   echo "$ac_t""no" 1>&6
  2890. fi
  2891.  
  2892. ac_safe=`echo "net/errno.h" | tr './\055' '___'`
  2893. echo $ac_n "checking for net/errno.h""... $ac_c" 1>&6
  2894. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  2895.   echo $ac_n "(cached) $ac_c" 1>&6
  2896. else
  2897.   cat > conftest.$ac_ext <<EOF
  2898. #line 2899 "configure"
  2899. #include "confdefs.h"
  2900. #include <net/errno.h>
  2901. EOF
  2902. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2903. ac_err=`grep -v '^ *+' conftest.out`
  2904. if test -z "$ac_err"; then
  2905.   rm -rf conftest*
  2906.   eval "ac_cv_header_$ac_safe=yes"
  2907. else
  2908.   echo "$ac_err" >&5
  2909.   rm -rf conftest*
  2910.   eval "ac_cv_header_$ac_safe=no"
  2911. fi
  2912. rm -f conftest*
  2913. fi
  2914. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2915.   echo "$ac_t""yes" 1>&6
  2916.   cat >> confdefs.h <<\EOF
  2917. #define HAVE_NET_ERRNO_H 1
  2918. EOF
  2919.  
  2920. else
  2921.   echo "$ac_t""no" 1>&6
  2922. fi
  2923.  
  2924.  
  2925. #--------------------------------------------------------------------
  2926. #    Check for the existence of the -lsocket and -lnsl libraries.
  2927. #    The order here is important, so that they end up in the right
  2928. #    order in the command line generated by make.  Here are some
  2929. #    special considerations:
  2930. #    1. Use "connect" and "accept" to check for -lsocket, and
  2931. #       "gethostbyname" to check for -lnsl.
  2932. #    2. Use each function name only once:  can't redo a check because
  2933. #       autoconf caches the results of the last check and won't redo it.
  2934. #    3. Use -lnsl and -lsocket only if they supply procedures that
  2935. #       aren't already present in the normal libraries.  This is because
  2936. #       IRIX 5.2 has libraries, but they aren't needed and they're
  2937. #       bogus:  they goof up name resolution if used.
  2938. #    4. On some SVR4 systems, can't use -lsocket without -lnsl too.
  2939. #       To get around this problem, check for both libraries together
  2940. #       if -lsocket doesn't work by itself.
  2941. #--------------------------------------------------------------------
  2942.  
  2943. tcl_checkBoth=0
  2944. echo $ac_n "checking for connect""... $ac_c" 1>&6
  2945. if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
  2946.   echo $ac_n "(cached) $ac_c" 1>&6
  2947. else
  2948.   cat > conftest.$ac_ext <<EOF
  2949. #line 2950 "configure"
  2950. #include "confdefs.h"
  2951. /* System header to define __stub macros and hopefully few prototypes,
  2952.     which can conflict with char connect(); below.  */
  2953. #include <assert.h>
  2954. /* Override any gcc2 internal prototype to avoid an error.  */
  2955. char connect();
  2956.  
  2957. int main() { return 0; }
  2958. int t() {
  2959.  
  2960. /* The GNU C library defines this for functions which it implements
  2961.     to always fail with ENOSYS.  Some functions are actually named
  2962.     something starting with __ and the normal name is an alias.  */
  2963. #if defined (__stub_connect) || defined (__stub___connect)
  2964. choke me
  2965. #else
  2966. connect();
  2967. #endif
  2968.  
  2969. ; return 0; }
  2970. EOF
  2971. if eval $ac_link; then
  2972.   rm -rf conftest*
  2973.   eval "ac_cv_func_connect=yes"
  2974. else
  2975.   rm -rf conftest*
  2976.   eval "ac_cv_func_connect=no"
  2977. fi
  2978. rm -f conftest*
  2979.  
  2980. fi
  2981. if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
  2982.   echo "$ac_t""yes" 1>&6
  2983.   tcl_checkSocket=0
  2984. else
  2985.   echo "$ac_t""no" 1>&6
  2986. tcl_checkSocket=1
  2987. fi
  2988.  
  2989. if test "$tcl_checkSocket" = 1; then
  2990.     echo $ac_n "checking for -lsocket""... $ac_c" 1>&6
  2991. ac_lib_var=`echo socket | tr '.-/+' '___p'`
  2992. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2993.   echo $ac_n "(cached) $ac_c" 1>&6
  2994. else
  2995.   ac_save_LIBS="$LIBS"
  2996. LIBS="-lsocket  $LIBS"
  2997. cat > conftest.$ac_ext <<EOF
  2998. #line 2999 "configure"
  2999. #include "confdefs.h"
  3000.  
  3001. int main() { return 0; }
  3002. int t() {
  3003. main()
  3004. ; return 0; }
  3005. EOF
  3006. if eval $ac_link; then
  3007.   rm -rf conftest*
  3008.   eval "ac_cv_lib_$ac_lib_var=yes"
  3009. else
  3010.   rm -rf conftest*
  3011.   eval "ac_cv_lib_$ac_lib_var=no"
  3012. fi
  3013. rm -f conftest*
  3014. LIBS="$ac_save_LIBS"
  3015.  
  3016. fi
  3017. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3018.   echo "$ac_t""yes" 1>&6
  3019.   LIBS="$LIBS -lsocket"
  3020. else
  3021.   echo "$ac_t""no" 1>&6
  3022. tcl_checkBoth=1
  3023. fi
  3024.  
  3025. fi
  3026. if test "$tcl_checkBoth" = 1; then
  3027.     tk_oldLibs=$LIBS
  3028.     LIBS="$LIBS -lsocket -lnsl"
  3029.     echo $ac_n "checking for accept""... $ac_c" 1>&6
  3030. if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then
  3031.   echo $ac_n "(cached) $ac_c" 1>&6
  3032. else
  3033.   cat > conftest.$ac_ext <<EOF
  3034. #line 3035 "configure"
  3035. #include "confdefs.h"
  3036. /* System header to define __stub macros and hopefully few prototypes,
  3037.     which can conflict with char accept(); below.  */
  3038. #include <assert.h>
  3039. /* Override any gcc2 internal prototype to avoid an error.  */
  3040. char accept();
  3041.  
  3042. int main() { return 0; }
  3043. int t() {
  3044.  
  3045. /* The GNU C library defines this for functions which it implements
  3046.     to always fail with ENOSYS.  Some functions are actually named
  3047.     something starting with __ and the normal name is an alias.  */
  3048. #if defined (__stub_accept) || defined (__stub___accept)
  3049. choke me
  3050. #else
  3051. accept();
  3052. #endif
  3053.  
  3054. ; return 0; }
  3055. EOF
  3056. if eval $ac_link; then
  3057.   rm -rf conftest*
  3058.   eval "ac_cv_func_accept=yes"
  3059. else
  3060.   rm -rf conftest*
  3061.   eval "ac_cv_func_accept=no"
  3062. fi
  3063. rm -f conftest*
  3064.  
  3065. fi
  3066. if eval "test \"`echo '$ac_cv_func_'accept`\" = yes"; then
  3067.   echo "$ac_t""yes" 1>&6
  3068.   tcl_checkNsl=0
  3069. else
  3070.   echo "$ac_t""no" 1>&6
  3071. LIBS=$tk_oldLibs
  3072. fi
  3073.  
  3074. fi
  3075. echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
  3076. if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
  3077.   echo $ac_n "(cached) $ac_c" 1>&6
  3078. else
  3079.   cat > conftest.$ac_ext <<EOF
  3080. #line 3081 "configure"
  3081. #include "confdefs.h"
  3082. /* System header to define __stub macros and hopefully few prototypes,
  3083.     which can conflict with char gethostbyname(); below.  */
  3084. #include <assert.h>
  3085. /* Override any gcc2 internal prototype to avoid an error.  */
  3086. char gethostbyname();
  3087.  
  3088. int main() { return 0; }
  3089. int t() {
  3090.  
  3091. /* The GNU C library defines this for functions which it implements
  3092.     to always fail with ENOSYS.  Some functions are actually named
  3093.     something starting with __ and the normal name is an alias.  */
  3094. #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
  3095. choke me
  3096. #else
  3097. gethostbyname();
  3098. #endif
  3099.  
  3100. ; return 0; }
  3101. EOF
  3102. if eval $ac_link; then
  3103.   rm -rf conftest*
  3104.   eval "ac_cv_func_gethostbyname=yes"
  3105. else
  3106.   rm -rf conftest*
  3107.   eval "ac_cv_func_gethostbyname=no"
  3108. fi
  3109. rm -f conftest*
  3110.  
  3111. fi
  3112. if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
  3113.   echo "$ac_t""yes" 1>&6
  3114.   :
  3115. else
  3116.   echo "$ac_t""no" 1>&6
  3117. echo $ac_n "checking for -lnsl""... $ac_c" 1>&6
  3118. ac_lib_var=`echo nsl | tr '.-/+' '___p'`
  3119. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3120.   echo $ac_n "(cached) $ac_c" 1>&6
  3121. else
  3122.   ac_save_LIBS="$LIBS"
  3123. LIBS="-lnsl  $LIBS"
  3124. cat > conftest.$ac_ext <<EOF
  3125. #line 3126 "configure"
  3126. #include "confdefs.h"
  3127.  
  3128. int main() { return 0; }
  3129. int t() {
  3130. main()
  3131. ; return 0; }
  3132. EOF
  3133. if eval $ac_link; then
  3134.   rm -rf conftest*
  3135.   eval "ac_cv_lib_$ac_lib_var=yes"
  3136. else
  3137.   rm -rf conftest*
  3138.   eval "ac_cv_lib_$ac_lib_var=no"
  3139. fi
  3140. rm -f conftest*
  3141. LIBS="$ac_save_LIBS"
  3142.  
  3143. fi
  3144. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3145.   echo "$ac_t""yes" 1>&6
  3146.   LIBS="$LIBS -lnsl"
  3147. else
  3148.   echo "$ac_t""no" 1>&6
  3149. fi
  3150.  
  3151. fi
  3152.  
  3153.  
  3154. #--------------------------------------------------------------------
  3155. #    The statements below define a collection of symbols related to
  3156. #    dynamic loading and shared libraries:
  3157. #
  3158. #    DL_OBJS -    Name of the object file that implements dynamic
  3159. #            loading for Tcl on this system.
  3160. #    DL_LIBS -    Library file(s) to include in tclsh and other base
  3161. #            applications in order for the "load" command to work.
  3162. #    LD_FLAGS -    Flags to pass to the compiler when linking object
  3163. #            files into an executable application binary such
  3164. #            as tclsh.
  3165. #    LD_SEARCH_FLAGS-Flags to pass to ld, such as "-R /usr/local/tcl/lib",
  3166. #            that tell the run-time dynamic linker where to look
  3167. #            for shared libraries such as libtcl.so.  Depends on
  3168. #            the variable LIB_INSTALL_DIR in the Makefile.
  3169. #    MAKE_LIB -    Command to execute to build the Tcl library;
  3170. #            differs depending on whether or not Tcl is being
  3171. #            compiled as a shared library.
  3172. #    SHLIB_CFLAGS -    Flags to pass to cc when compiling the components
  3173. #            of a shared library (may request position-independent
  3174. #            code, among other things).
  3175. #    SHLIB_LD -    Base command to use for combining object files
  3176. #            into a shared library.
  3177. #    SHLIB_LD_LIBS -    Dependent libraries for the linker to scan when
  3178. #            creating shared libraries.  This symbol typically
  3179. #            goes at the end of the "ld" commands that build
  3180. #            shared libraries. The value of the symbol is
  3181. #            "${LIBS}" if all of the dependent libraries should
  3182. #            be specified when creating a shared library.  If
  3183. #            dependent libraries should not be specified (as on
  3184. #            SunOS 4.x, where they cause the link to fail, or in
  3185. #            general if Tcl and Tk aren't themselves shared
  3186. #            libraries), then this symbol has an empty string
  3187. #            as its value.
  3188. #    SHLIB_SUFFIX -    Suffix to use for the names of dynamically loadable
  3189. #            extensions.  An empty string means we don't know how
  3190. #            to use shared libraries on this platform.
  3191. #    TCL_LIB_FILE -    Name of the file that contains the Tcl library, such
  3192. #            as libtcl7.5.so or libtcl7.5.a.
  3193. #    TCL_LIB_SUFFIX -Specifies everything that comes after the "libtcl"
  3194. #            in the shared library name, using the $VERSION variable
  3195. #            to put the version in the right place.  This is used
  3196. #            by platforms that need non-standard library names.
  3197. #            Examples:  ${VERSION}.so.1.1 on NetBSD, since it needs
  3198. #            to have a version after the .so, and ${VERSION}.a
  3199. #            on AIX, since the Tcl shared library needs to have
  3200. #            a .a extension whereas shared objects for loadable
  3201. #            extensions have a .so extension.  Defaults to
  3202. #            ${VERSION}${SHLIB_SUFFIX}.
  3203. #--------------------------------------------------------------------
  3204.  
  3205. # Step 1: set the variable "system" to hold the name and version number
  3206. # for the system.  This can usually be done via the "uname" command, but
  3207. # there are a few systems, like Next, where this doesn't work.
  3208.  
  3209. echo $ac_n "checking system version (for dynamic loading)""... $ac_c" 1>&6
  3210. if test -f /usr/lib/NextStep/software_version; then
  3211.     system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
  3212. else
  3213.     system=`uname -s`-`uname -r`
  3214.     if test "$?" -ne 0 ; then
  3215.     echo "$ac_t""unknown (can't find uname command)" 1>&6
  3216.     system=unknown
  3217.     else
  3218.     # Special check for weird MP-RAS system (uname returns weird
  3219.     # results, and the version is kept in special file).
  3220.     
  3221.     if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
  3222.         system=MP-RAS-`awk '{print $3}' /etc/.relid'`
  3223.     fi
  3224.     if test "`uname -s`" = "AIX" ; then
  3225.         system=AIX-`uname -v`.`uname -r`
  3226.     fi
  3227.     echo "$ac_t""$system" 1>&6
  3228.     fi
  3229. fi
  3230.  
  3231. # Step 2: check for existence of -ldl library.  This is needed because
  3232. # Linux can use either -ldl or -ldld for dynamic loading.
  3233.  
  3234. echo $ac_n "checking for -ldl""... $ac_c" 1>&6
  3235. ac_lib_var=`echo dl | tr '.-/+' '___p'`
  3236. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3237.   echo $ac_n "(cached) $ac_c" 1>&6
  3238. else
  3239.   ac_save_LIBS="$LIBS"
  3240. LIBS="-ldl  $LIBS"
  3241. cat > conftest.$ac_ext <<EOF
  3242. #line 3243 "configure"
  3243. #include "confdefs.h"
  3244.  
  3245. int main() { return 0; }
  3246. int t() {
  3247. dlopen()
  3248. ; return 0; }
  3249. EOF
  3250. if eval $ac_link; then
  3251.   rm -rf conftest*
  3252.   eval "ac_cv_lib_$ac_lib_var=yes"
  3253. else
  3254.   rm -rf conftest*
  3255.   eval "ac_cv_lib_$ac_lib_var=no"
  3256. fi
  3257. rm -f conftest*
  3258. LIBS="$ac_save_LIBS"
  3259.  
  3260. fi
  3261. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3262.   echo "$ac_t""yes" 1>&6
  3263.   have_dl=yes
  3264. else
  3265.   echo "$ac_t""no" 1>&6
  3266. have_dl=no
  3267. fi
  3268.  
  3269.  
  3270. # Step 3: disable dynamic loading if requested via a command-line switch.
  3271.  
  3272. # Check whether --enable-load or --disable-load was given.
  3273. if test "${enable_load+set}" = set; then
  3274.   enableval="$enable_load"
  3275.   tcl_ok=$enableval
  3276. else
  3277.   tcl_ok=yes
  3278. fi
  3279.  
  3280. if test "$tcl_ok" = "no"; then
  3281.     system=unknown
  3282. fi
  3283.  
  3284. # Step 4: set configuration options based on system name and version.
  3285.  
  3286. fullSrcDir=`cd $srcdir; pwd`
  3287. AIX=no
  3288. TCL_SHARED_LIB_SUFFIX=""
  3289. TCL_UNSHARED_LIB_SUFFIX=""
  3290. TCL_LIB_VERSIONS_OK=ok
  3291. case $system in
  3292.     AIX-*)
  3293.     SHLIB_CFLAGS=""
  3294.     SHLIB_LD="$fullSrcDir/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512"
  3295.     SHLIB_LD_LIBS='${LIBS}'
  3296.     SHLIB_SUFFIX=".so"
  3297.     DL_OBJS="tclLoadDl.o tclLoadAix.o"
  3298.     DL_LIBS="-lld"
  3299.     LD_FLAGS=""
  3300.     LD_SEARCH_FLAGS='-L${LIB_INSTALL_DIR}'
  3301.     cat >> confdefs.h <<\EOF
  3302. #define NO_DLFCN_H 1
  3303. EOF
  3304.  
  3305.     AIX=yes
  3306.     TCL_SHARED_LIB_SUFFIX='${VERSION}.a'
  3307.     ;;
  3308.     HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
  3309.     SHLIB_CFLAGS="+z"
  3310.     SHLIB_LD="ld -b"
  3311.     SHLIB_LD_LIBS='${LIBS}'
  3312.     SHLIB_SUFFIX=".sl"
  3313.     DL_OBJS="tclLoadShl.o"
  3314.     DL_LIBS="-ldld"
  3315.     LD_FLAGS="-Wl,-E"
  3316.     LD_SEARCH_FLAGS='-Wl,+b,${LIB_INSTALL_DIR}:.'
  3317.     ;;
  3318.     IRIX-4.*)
  3319.     SHLIB_CFLAGS="-G 0"
  3320.     SHLIB_SUFFIX="..o"
  3321.     SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
  3322.     SHLIB_LD_LIBS=""
  3323.     DL_OBJS="tclLoadAout.o"
  3324.     DL_LIBS=""
  3325.     LD_FLAGS="-Wl,-D,08000000"
  3326.     LD_SEARCH_FLAGS=""
  3327.     ;;
  3328.     IRIX-5.*)
  3329.     SHLIB_CFLAGS=""
  3330.     SHLIB_LD="ld -shared -rdata_shared"
  3331.     SHLIB_LD_LIBS=""
  3332.     SHLIB_SUFFIX=".so"
  3333.     DL_OBJS="tclLoadDl.o"
  3334.     DL_LIBS=""
  3335.     LD_FLAGS=""
  3336.     LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_INSTALL_DIR}'
  3337.     ;;
  3338.     Linux*)
  3339.     SHLIB_CFLAGS="-fPIC"
  3340.     SHLIB_LD_LIBS=""
  3341.     SHLIB_SUFFIX=".so"
  3342.     if test "$have_dl" = yes; then
  3343.         SHLIB_LD="${CC} -shared"
  3344.         DL_OBJS="tclLoadDl.o"
  3345.         DL_LIBS="-ldl"
  3346.         LD_FLAGS="-rdynamic"
  3347.         LD_SEARCH_FLAGS=""
  3348.     else
  3349.         ac_safe=`echo "dld.h" | tr './\055' '___'`
  3350. echo $ac_n "checking for dld.h""... $ac_c" 1>&6
  3351. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  3352.   echo $ac_n "(cached) $ac_c" 1>&6
  3353. else
  3354.   cat > conftest.$ac_ext <<EOF
  3355. #line 3356 "configure"
  3356. #include "confdefs.h"
  3357. #include <dld.h>
  3358. EOF
  3359. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3360. ac_err=`grep -v '^ *+' conftest.out`
  3361. if test -z "$ac_err"; then
  3362.   rm -rf conftest*
  3363.   eval "ac_cv_header_$ac_safe=yes"
  3364. else
  3365.   echo "$ac_err" >&5
  3366.   rm -rf conftest*
  3367.   eval "ac_cv_header_$ac_safe=no"
  3368. fi
  3369. rm -f conftest*
  3370. fi
  3371. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  3372.   echo "$ac_t""yes" 1>&6
  3373.   
  3374.         SHLIB_LD="ld -shared"
  3375.         DL_OBJS="tclLoadDld.o"
  3376.         DL_LIBS="-ldld"
  3377.         LD_FLAGS=""
  3378.         LD_SEARCH_FLAGS=""
  3379. else
  3380.   echo "$ac_t""no" 1>&6
  3381. fi
  3382.  
  3383.     fi
  3384.     ;;
  3385.     MP-RAS-02*)
  3386.     SHLIB_CFLAGS="-K PIC"
  3387.     SHLIB_LD="cc -G"
  3388.     SHLIB_LD_LIBS=""
  3389.     SHLIB_SUFFIX=".so"
  3390.     DL_OBJS="tclLoadDl.o"
  3391.     DL_LIBS="-ldl"
  3392.     LD_FLAGS=""
  3393.     LD_SEARCH_FLAGS=""
  3394.     ;;
  3395.     MP-RAS-*)
  3396.     SHLIB_CFLAGS="-K PIC"
  3397.     SHLIB_LD="cc -G"
  3398.     SHLIB_LD_LIBS=""
  3399.     SHLIB_SUFFIX=".so"
  3400.     DL_OBJS="tclLoadDl.o"
  3401.     DL_LIBS="-ldl"
  3402.     LD_FLAGS="-Wl,-Bexport"
  3403.     LD_SEARCH_FLAGS=""
  3404.     ;;
  3405.     NetBSD-*|FreeBSD-*)
  3406.     # Not available on all versions:  check for include file.
  3407.     ac_safe=`echo "dlfcn.h" | tr './\055' '___'`
  3408. echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
  3409. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  3410.   echo $ac_n "(cached) $ac_c" 1>&6
  3411. else
  3412.   cat > conftest.$ac_ext <<EOF
  3413. #line 3414 "configure"
  3414. #include "confdefs.h"
  3415. #include <dlfcn.h>
  3416. EOF
  3417. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3418. ac_err=`grep -v '^ *+' conftest.out`
  3419. if test -z "$ac_err"; then
  3420.   rm -rf conftest*
  3421.   eval "ac_cv_header_$ac_safe=yes"
  3422. else
  3423.   echo "$ac_err" >&5
  3424.   rm -rf conftest*
  3425.   eval "ac_cv_header_$ac_safe=no"
  3426. fi
  3427. rm -f conftest*
  3428. fi
  3429. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  3430.   echo "$ac_t""yes" 1>&6
  3431.   
  3432.         SHLIB_CFLAGS="-fpic"
  3433.         SHLIB_LD="ld -Bshareable"
  3434.         SHLIB_LD_LIBS=""
  3435.         SHLIB_SUFFIX=".so"
  3436.         DL_OBJS="tclLoadDl2.o"
  3437.         DL_LIBS=""
  3438.         LD_FLAGS=""
  3439.         LD_SEARCH_FLAGS=""
  3440.     
  3441. else
  3442.   echo "$ac_t""no" 1>&6
  3443.  
  3444.         SHLIB_CFLAGS=""
  3445.         SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
  3446.         SHLIB_LD_LIBS=""
  3447.         SHLIB_SUFFIX="..o"
  3448.         DL_OBJS="tclLoadAout.o"
  3449.         DL_LIBS=""
  3450.         LD_FLAGS=""
  3451.         LD_SEARCH_FLAGS=""
  3452.     
  3453. fi
  3454.  
  3455.  
  3456.     # FreeBSD doesn't handle version numbers with dots.  Also, have to
  3457.     # append a dummy version number to .so file names.
  3458.  
  3459.     TCL_SHARED_LIB_SUFFIX='`echo ${VERSION} | tr -d .`.so.1.0'
  3460.     TCL_UNSHARED_LIB_SUFFIX='`echo ${VERSION} | tr -d .`.a'
  3461.     TCL_LIB_VERSIONS_OK=nodots
  3462.     ;;
  3463.     NEXTSTEP-*)
  3464.     SHLIB_CFLAGS=""
  3465.     SHLIB_LD="cc -nostdlib -r"
  3466.     SHLIB_LD_LIBS=""
  3467.     SHLIB_SUFFIX=".so"
  3468.     DL_OBJS="tclLoadNext.o"
  3469.     DL_LIBS=""
  3470.     LD_FLAGS=""
  3471.     LD_SEARCH_FLAGS=""
  3472.     ;;
  3473.     OSF1-1.012)
  3474.     # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
  3475.     SHLIB_CFLAGS=""
  3476.     # Hack: make package name same as library name
  3477.     SHLIB_LD='ld -R -export $@:'
  3478.     SHLIB_LD_LIBS=""
  3479.     SHLIB_SUFFIX=".so"
  3480.     DL_OBJS="tclLoadOSF.o"
  3481.     DL_LIBS=""
  3482.     LD_FLAGS=""
  3483.     LD_SEARCH_FLAGS=""
  3484.     ;;
  3485.     OSF1-1.*)
  3486.     # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
  3487.     SHLIB_CFLAGS="-fpic"
  3488.     SHLIB_LD="ld -shared"
  3489.     SHLIB_LD_LIBS=""
  3490.     SHLIB_SUFFIX=".so"
  3491.     DL_OBJS="tclLoadDl.o"
  3492.     DL_LIBS=""
  3493.     LD_FLAGS=""
  3494.     LD_SEARCH_FLAGS=""
  3495.     ;;
  3496.     OSF1-V*)
  3497.         # Digital OSF/1
  3498.     SHLIB_CFLAGS=""
  3499.     SHLIB_LD='ld -shared -expect_unresolved "*"'
  3500.     SHLIB_LD_LIBS=""
  3501.     SHLIB_SUFFIX=".so"
  3502.     DL_OBJS="tclLoadDl.o"
  3503.     DL_LIBS=""
  3504.     LD_FLAGS=""
  3505.     LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_INSTALL_DIR}'
  3506.     ;;
  3507.     RISCos-*)
  3508.     SHLIB_CFLAGS="-G 0"
  3509.     SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
  3510.     SHLIB_LD_LIBS=""
  3511.     SHLIB_SUFFIX="..o"
  3512.     DL_OBJS="tclLoadAout.o"
  3513.     DL_LIBS=""
  3514.     LD_FLAGS="-Wl,-D,08000000"
  3515.     LD_SEARCH_FLAGS=""
  3516.     ;;
  3517.     SCO_SV-3.2*)
  3518.         # Note, dlopen is available only on SCO 3.2.5 and greater.  However,
  3519.         # this test works, since "uname -s" was non-standard in 3.2.4 and
  3520.         # below.
  3521.     SHLIB_CFLAGS="-Kpic -belf"
  3522.     SHLIB_LD="ld -G"
  3523.     SHLIB_LD_LIBS=""
  3524.     SHLIB_SUFFIX=".so"
  3525.     DL_OBJS="tclLoadDl.o"
  3526.     DL_LIBS=""
  3527.     LD_FLAGS="-belf -Wl,-Bexport"
  3528.     LD_SEARCH_FLAGS=""
  3529.     ;;
  3530.      SINIX*5.4*)
  3531.     SHLIB_CFLAGS="-K PIC"
  3532.     SHLIB_LD="cc -G"
  3533.     SHLIB_LD_LIBS=""
  3534.     SHLIB_SUFFIX=".so"
  3535.     DL_OBJS="tclLoadDl.o"
  3536.     DL_LIBS="-ldl"
  3537.     LD_FLAGS=""
  3538.     LD_SEARCH_FLAGS=""
  3539.     ;;
  3540.     SunOS-4*)
  3541.     SHLIB_CFLAGS="-PIC"
  3542.     SHLIB_LD="ld"
  3543.     SHLIB_LD_LIBS=""
  3544.     SHLIB_SUFFIX=".so"
  3545.     DL_OBJS="tclLoadDl.o"
  3546.     DL_LIBS="-ldl"
  3547.     LD_FLAGS=""
  3548.     LD_SEARCH_FLAGS='-L${LIB_INSTALL_DIR}'
  3549.  
  3550.     # SunOS can't handle version numbers with dots in them in library
  3551.     # specs, like -ltcl7.5, so use -ltcl75 instead.  Also, it
  3552.     # requires an extra version number at the end of .so file names.
  3553.     # So, the library has to have a name like libtcl75.so.1.0
  3554.  
  3555.     TCL_SHARED_LIB_SUFFIX='`echo ${VERSION} | tr -d .`.so.1.0'
  3556.     TCL_UNSHARED_LIB_SUFFIX='`echo ${VERSION} | tr -d .`.a'
  3557.     TCL_LIB_VERSIONS_OK=nodots
  3558.     ;;
  3559.     SunOS-5*)
  3560.     SHLIB_CFLAGS="-K PIC"
  3561.     SHLIB_LD="/usr/ccs/bin/ld -G -z text"
  3562.     SHLIB_LD_LIBS='${LIBS}'
  3563.     SHLIB_SUFFIX=".so"
  3564.     DL_OBJS="tclLoadDl.o"
  3565.     DL_LIBS="-ldl"
  3566.     LD_FLAGS=""
  3567.     LD_SEARCH_FLAGS='-R ${LIB_INSTALL_DIR}'
  3568.     ;;
  3569.     ULTRIX-4.*)
  3570.     SHLIB_CFLAGS="-G 0"
  3571.     SHLIB_SUFFIX="..o"
  3572.     SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
  3573.     SHLIB_LD_LIBS=""
  3574.     DL_OBJS="tclLoadAout.o"
  3575.     DL_LIBS=""
  3576.     LD_FLAGS="-Wl,-D,08000000"
  3577.     LD_SEARCH_FLAGS=""
  3578.     ;;
  3579.     UNIX_SV*)
  3580.     SHLIB_CFLAGS="-K PIC"
  3581.     SHLIB_LD="cc -G"
  3582.     SHLIB_LD_LIBS=""
  3583.     SHLIB_SUFFIX=".so"
  3584.     DL_OBJS="tclLoadDl.o"
  3585.     DL_LIBS="-ldl"
  3586.     LD_FLAGS="-Wl,-Bexport"
  3587.     LD_SEARCH_FLAGS=""
  3588.     ;;
  3589. esac
  3590.  
  3591. # If pseudo-static linking is in use (see K. B. Kenny, "Dynamic Loading for
  3592. # Tcl -- What Became of It?".  Proc. 2nd Tcl/Tk Workshop, New Orleans, LA,
  3593. # Computerized Processes Unlimited, 1994), then we need to determine which
  3594. # of several header files defines the a.out file format (a.out.h, sys/exec.h,
  3595. # or sys/exec_aout.h).  At present, we support only a file format that
  3596. # is more or less version-7-compatible.  In particular,
  3597. #    - a.out files must begin with `struct exec'.
  3598. #    - the N_TXTOFF on the `struct exec' must compute the seek address
  3599. #      of the text segment
  3600. #    - The `struct exec' must contain a_magic, a_text, a_data, a_bss
  3601. #      and a_entry fields.
  3602. # The following compilation should succeed if and only if either sys/exec.h
  3603. # or a.out.h is usable for the purpose.
  3604. #
  3605. # Note that the modified COFF format used on MIPS Ultrix 4.x is usable; the
  3606. # `struct exec' includes a second header that contains information that
  3607. # duplicates the v7 fields that are needed.
  3608.  
  3609. if test "x$DL_OBJS" = "xtclLoadAout.o" ; then
  3610.     echo $ac_n "checking sys/exec.h""... $ac_c" 1>&6
  3611.     cat > conftest.$ac_ext <<EOF
  3612. #line 3613 "configure"
  3613. #include "confdefs.h"
  3614. #include <sys/exec.h>
  3615. int main() { return 0; }
  3616. int t() {
  3617.  
  3618.     struct exec foo;
  3619.     unsigned long seek;
  3620.     int flag;
  3621. #if defined(__mips) || defined(mips)
  3622.     seek = N_TXTOFF (foo.ex_f, foo.ex_o);
  3623. #else
  3624.     seek = N_TXTOFF (foo);
  3625. #endif
  3626.     flag = (foo.a_magic == OMAGIC);
  3627.     return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
  3628.  
  3629. ; return 0; }
  3630. EOF
  3631. if eval $ac_compile; then
  3632.   rm -rf conftest*
  3633.   tcl_ok=usable
  3634. else
  3635.   rm -rf conftest*
  3636.   tcl_ok=unusable
  3637. fi
  3638. rm -f conftest*
  3639.  
  3640.     echo "$ac_t""$tcl_ok" 1>&6
  3641.     if test $tcl_ok = usable; then
  3642.     cat >> confdefs.h <<\EOF
  3643. #define USE_SYS_EXEC_H 1
  3644. EOF
  3645.  
  3646.     else
  3647.     echo $ac_n "checking a.out.h""... $ac_c" 1>&6
  3648.     cat > conftest.$ac_ext <<EOF
  3649. #line 3650 "configure"
  3650. #include "confdefs.h"
  3651. #include <a.out.h>
  3652. int main() { return 0; }
  3653. int t() {
  3654.  
  3655.         struct exec foo;
  3656.         unsigned long seek;
  3657.         int flag;
  3658. #if defined(__mips) || defined(mips)
  3659.         seek = N_TXTOFF (foo.ex_f, foo.ex_o);
  3660. #else
  3661.         seek = N_TXTOFF (foo);
  3662. #endif
  3663.         flag = (foo.a_magic == OMAGIC);
  3664.         return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
  3665.     
  3666. ; return 0; }
  3667. EOF
  3668. if eval $ac_compile; then
  3669.   rm -rf conftest*
  3670.   tcl_ok=usable
  3671. else
  3672.   rm -rf conftest*
  3673.   tcl_ok=unusable
  3674. fi
  3675. rm -f conftest*
  3676.  
  3677.     echo "$ac_t""$tcl_ok" 1>&6
  3678.     if test $tcl_ok = usable; then
  3679.         cat >> confdefs.h <<\EOF
  3680. #define USE_A_OUT_H 1
  3681. EOF
  3682.  
  3683.     else
  3684.         echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6
  3685.         cat > conftest.$ac_ext <<EOF
  3686. #line 3687 "configure"
  3687. #include "confdefs.h"
  3688. #include <sys/exec_aout.h>
  3689. int main() { return 0; }
  3690. int t() {
  3691.  
  3692.         struct exec foo;
  3693.         unsigned long seek;
  3694.         int flag;
  3695. #if defined(__mips) || defined(mips)
  3696.         seek = N_TXTOFF (foo.ex_f, foo.ex_o);
  3697. #else
  3698.         seek = N_TXTOFF (foo);
  3699. #endif
  3700.         flag = (foo.a_midmag == OMAGIC);
  3701.         return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
  3702.         
  3703. ; return 0; }
  3704. EOF
  3705. if eval $ac_compile; then
  3706.   rm -rf conftest*
  3707.   tcl_ok=usable
  3708. else
  3709.   rm -rf conftest*
  3710.   tcl_ok=unusable
  3711. fi
  3712. rm -f conftest*
  3713.  
  3714.         echo "$ac_t""$tcl_ok" 1>&6
  3715.         if test $tcl_ok = usable; then
  3716.         cat >> confdefs.h <<\EOF
  3717. #define USE_SYS_EXEC_AOUT_H 1
  3718. EOF
  3719.  
  3720.         else
  3721.         DL_OBJS=""
  3722.         fi
  3723.     fi
  3724.     fi
  3725. fi
  3726.  
  3727. if test "x$DL_OBJS" != "x" ; then
  3728.     BUILD_DLTEST="\$(DLTEST_TARGETS)"
  3729. else
  3730.     echo "Can't figure out how to do dynamic loading or shared libraries"
  3731.     echo "on this system."
  3732.     SHLIB_CFLAGS=""
  3733.     SHLIB_LD=""
  3734.     SHLIB_SUFFIX=""
  3735.     DL_OBJS="tclLoadNone.o"
  3736.     DL_LIBS=""
  3737.     LD_FLAGS=""
  3738.     LD_SEARCH_FLAGS=""
  3739.     BUILD_DLTEST=""
  3740. fi
  3741.  
  3742. # If we're running gcc, then change the C flags for compiling shared
  3743. # libraries to the right flags for gcc, instead of those for the
  3744. # standard manufacturer compiler.
  3745.  
  3746. if test "$DL_OBJS" != "tclLoadNone.o" ; then
  3747.     if test "$CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then
  3748.     SHLIB_CFLAGS="-fPIC"
  3749.     fi
  3750. fi
  3751.  
  3752. #--------------------------------------------------------------------
  3753. #    The statements below define a collection of symbols related to
  3754. #    building libtcl as a shared library instead of a static library.
  3755. #--------------------------------------------------------------------
  3756.  
  3757. realRanlib=$RANLIB
  3758. if test "$TCL_SHARED_LIB_SUFFIX" = "" ; then
  3759.     TCL_SHARED_LIB_SUFFIX='${VERSION}${SHLIB_SUFFIX}'
  3760. fi
  3761. if test "$TCL_UNSHARED_LIB_SUFFIX" = "" ; then
  3762.     TCL_UNSHARED_LIB_SUFFIX='${VERSION}.a'
  3763. fi
  3764. # Check whether --enable-shared or --disable-shared was given.
  3765. if test "${enable_shared+set}" = set; then
  3766.   enableval="$enable_shared"
  3767.   tcl_ok=$enableval
  3768. else
  3769.   tcl_ok=no
  3770. fi
  3771.  
  3772. if test "$tcl_ok" = "yes" -a "${SHLIB_SUFFIX}" != "" \
  3773.     -a "${DL_OBJS}" != "tclLoadAout.o" ; then
  3774.     TCL_SHLIB_CFLAGS="${SHLIB_CFLAGS}"
  3775.     TCL_LD_SEARCH_FLAGS="${LD_SEARCH_FLAGS}"
  3776.     eval "TCL_LIB_FILE=libtcl${TCL_SHARED_LIB_SUFFIX}"
  3777.     MAKE_LIB="\${SHLIB_LD} -o ${TCL_LIB_FILE} \${OBJS} ${SHLIB_LD_LIBS}"
  3778.     RANLIB=":"
  3779. else
  3780.     if test "$AIX" = "no" ; then
  3781.     SHLIB_LD_LIBS=""
  3782.     fi
  3783.     TCL_SHLIB_CFLAGS=""
  3784.     TCL_LD_SEARCH_FLAGS=""
  3785.     eval "TCL_LIB_FILE=libtcl${TCL_UNSHARED_LIB_SUFFIX}"
  3786.     MAKE_LIB="ar cr ${TCL_LIB_FILE} \${OBJS}"
  3787. fi
  3788.  
  3789. # Note:  in the following variable, it's important to use the absolute
  3790. # path name of the Tcl directory rather than "..":  this is because
  3791. # AIX remembers this path and will attempt to use it at run-time to look
  3792. # up the Tcl library.
  3793.  
  3794. if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
  3795.     TCL_BUILD_LIB_SPEC="-L`pwd` -ltcl${VERSION}"
  3796.     TCL_LIB_SPEC="-L${exec_prefix}/lib -ltcl${VERSION}"
  3797. else
  3798.     TCL_BUILD_LIB_SPEC="-L`pwd` -ltcl`echo ${VERSION} | tr -d .`"
  3799.     TCL_LIB_SPEC="-L${exec_prefix}/lib -ltcl`echo ${VERSION} | tr -d .`"
  3800. fi
  3801.  
  3802.  
  3803.  
  3804.  
  3805.  
  3806.  
  3807.  
  3808.  
  3809.  
  3810.  
  3811.  
  3812.  
  3813.  
  3814.  
  3815.  
  3816.  
  3817.  
  3818.  
  3819.  
  3820.  
  3821.  
  3822.  
  3823.  
  3824. trap '' 1 2 15
  3825. cat > confcache <<\EOF
  3826. # This file is a shell script that caches the results of configure
  3827. # tests run on this system so they can be shared between configure
  3828. # scripts and configure runs.  It is not useful on other systems.
  3829. # If it contains results you don't want to keep, you may remove or edit it.
  3830. #
  3831. # By default, configure uses ./config.cache as the cache file,
  3832. # creating it if it does not exist already.  You can give configure
  3833. # the --cache-file=FILE option to use a different cache file; that is
  3834. # what configure does when it calls configure scripts in
  3835. # subdirectories, so they share the cache.
  3836. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  3837. # config.status only pays attention to the cache file if you give it the
  3838. # --recheck option to rerun configure.
  3839. #
  3840. EOF
  3841. # Ultrix sh set writes to stderr and can't be redirected directly,
  3842. # and sets the high bit in the cache file unless we assign to the vars.
  3843. (set) 2>&1 |
  3844.   sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
  3845.   >> confcache
  3846. if cmp -s $cache_file confcache; then
  3847.   :
  3848. else
  3849.   if test -w $cache_file; then
  3850.     echo "updating cache $cache_file"
  3851.     cat confcache > $cache_file
  3852.   else
  3853.     echo "not updating unwritable cache $cache_file"
  3854.   fi
  3855. fi
  3856. rm -f confcache
  3857.  
  3858. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  3859.  
  3860. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  3861. # Let make expand exec_prefix.
  3862. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  3863.  
  3864. # Any assignment to VPATH causes Sun make to only execute
  3865. # the first set of double-colon rules, so remove it if not needed.
  3866. # If there is a colon in the path, we need to keep it.
  3867. if test "x$srcdir" = x.; then
  3868.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  3869. fi
  3870.  
  3871. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  3872.  
  3873. # Transform confdefs.h into DEFS.
  3874. # Protect against shell expansion while executing Makefile rules.
  3875. # Protect against Makefile macro expansion.
  3876. cat > conftest.defs <<\EOF
  3877. s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%-D\1=\2%g
  3878. s%[     `~#$^&*(){}\\|;'"<>?]%\\&%g
  3879. s%\[%\\&%g
  3880. s%\]%\\&%g
  3881. s%\$%$$%g
  3882. EOF
  3883. DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
  3884. rm -f conftest.defs
  3885.  
  3886.  
  3887. # Without the "./", some shells look in PATH for config.status.
  3888. : ${CONFIG_STATUS=./config.status}
  3889.  
  3890. echo creating $CONFIG_STATUS
  3891. rm -f $CONFIG_STATUS
  3892. cat > $CONFIG_STATUS <<EOF
  3893. #! /bin/sh
  3894. # Generated automatically by configure.
  3895. # Run this file to recreate the current configuration.
  3896. # This directory was configured as follows,
  3897. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  3898. #
  3899. # $0 $ac_configure_args
  3900. #
  3901. # Compiler output produced by configure, useful for debugging
  3902. # configure, is in ./config.log if it exists.
  3903.  
  3904. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  3905. for ac_option
  3906. do
  3907.   case "\$ac_option" in
  3908.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  3909.     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  3910.     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  3911.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  3912.     echo "$CONFIG_STATUS generated by autoconf version 2.7"
  3913.     exit 0 ;;
  3914.   -help | --help | --hel | --he | --h)
  3915.     echo "\$ac_cs_usage"; exit 0 ;;
  3916.   *) echo "\$ac_cs_usage"; exit 1 ;;
  3917.   esac
  3918. done
  3919.  
  3920. ac_given_srcdir=$srcdir
  3921.  
  3922. trap 'rm -fr `echo "Makefile tclConfig.sh" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  3923. EOF
  3924. cat >> $CONFIG_STATUS <<EOF
  3925.  
  3926. # Protect against being on the right side of a sed subst in config.status.
  3927. sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  3928.  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
  3929. $ac_vpsub
  3930. $extrasub
  3931. s%@CFLAGS@%$CFLAGS%g
  3932. s%@CPPFLAGS@%$CPPFLAGS%g
  3933. s%@CXXFLAGS@%$CXXFLAGS%g
  3934. s%@DEFS@%$DEFS%g
  3935. s%@LDFLAGS@%$LDFLAGS%g
  3936. s%@LIBS@%$LIBS%g
  3937. s%@exec_prefix@%$exec_prefix%g
  3938. s%@prefix@%$prefix%g
  3939. s%@program_transform_name@%$program_transform_name%g
  3940. s%@bindir@%$bindir%g
  3941. s%@sbindir@%$sbindir%g
  3942. s%@libexecdir@%$libexecdir%g
  3943. s%@datadir@%$datadir%g
  3944. s%@sysconfdir@%$sysconfdir%g
  3945. s%@sharedstatedir@%$sharedstatedir%g
  3946. s%@localstatedir@%$localstatedir%g
  3947. s%@libdir@%$libdir%g
  3948. s%@includedir@%$includedir%g
  3949. s%@oldincludedir@%$oldincludedir%g
  3950. s%@infodir@%$infodir%g
  3951. s%@mandir@%$mandir%g
  3952. s%@RANLIB@%$RANLIB%g
  3953. s%@CC@%$CC%g
  3954. s%@LIBOBJS@%$LIBOBJS%g
  3955. s%@CPP@%$CPP%g
  3956. s%@BUILD_DLTEST@%$BUILD_DLTEST%g
  3957. s%@DL_LIBS@%$DL_LIBS%g
  3958. s%@DL_OBJS@%$DL_OBJS%g
  3959. s%@LD_FLAGS@%$LD_FLAGS%g
  3960. s%@MAKE_LIB@%$MAKE_LIB%g
  3961. s%@MATH_LIBS@%$MATH_LIBS%g
  3962. s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
  3963. s%@SHLIB_LD@%$SHLIB_LD%g
  3964. s%@SHLIB_LD_LIBS@%$SHLIB_LD_LIBS%g
  3965. s%@SHLIB_SUFFIX@%$SHLIB_SUFFIX%g
  3966. s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
  3967. s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g
  3968. s%@TCL_LIB_FILE@%$TCL_LIB_FILE%g
  3969. s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
  3970. s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g
  3971. s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g
  3972. s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g
  3973. s%@TCL_SHARED_LIB_SUFFIX@%$TCL_SHARED_LIB_SUFFIX%g
  3974. s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g
  3975. s%@TCL_UNSHARED_LIB_SUFFIX@%$TCL_UNSHARED_LIB_SUFFIX%g
  3976. s%@TCL_VERSION@%$TCL_VERSION%g
  3977.  
  3978. CEOF
  3979. EOF
  3980. cat >> $CONFIG_STATUS <<EOF
  3981.  
  3982. CONFIG_FILES=\${CONFIG_FILES-"Makefile tclConfig.sh"}
  3983. EOF
  3984. cat >> $CONFIG_STATUS <<\EOF
  3985. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  3986.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  3987.   case "$ac_file" in
  3988.   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  3989.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  3990.   *) ac_file_in="${ac_file}.in" ;;
  3991.   esac
  3992.  
  3993.   # Adjust relative srcdir, etc. for subdirectories.
  3994.  
  3995.   # Remove last slash and all that follows it.  Not all systems have dirname.
  3996.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  3997.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  3998.     # The file is in a subdirectory.
  3999.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  4000.     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  4001.     # A "../" for each directory in $ac_dir_suffix.
  4002.     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  4003.   else
  4004.     ac_dir_suffix= ac_dots=
  4005.   fi
  4006.  
  4007.   case "$ac_given_srcdir" in
  4008.   .)  srcdir=.
  4009.       if test -z "$ac_dots"; then top_srcdir=.
  4010.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  4011.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  4012.   *) # Relative path.
  4013.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  4014.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  4015.   esac
  4016.  
  4017.   echo creating "$ac_file"
  4018.   rm -f "$ac_file"
  4019.   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  4020.   case "$ac_file" in
  4021.   *Makefile*) ac_comsub="1i\\
  4022. # $configure_input" ;;
  4023.   *) ac_comsub= ;;
  4024.   esac
  4025.   sed -e "$ac_comsub
  4026. s%@configure_input@%$configure_input%g
  4027. s%@srcdir@%$srcdir%g
  4028. s%@top_srcdir@%$top_srcdir%g
  4029. " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
  4030. fi; done
  4031. rm -f conftest.subs
  4032.  
  4033.  
  4034.  
  4035. exit 0
  4036. EOF
  4037. chmod +x $CONFIG_STATUS
  4038. rm -fr confdefs* $ac_clean_files
  4039. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  4040.  
  4041.